you need to define the WHERE statement of your Read Data, it must read the previous user's record, do you have a table column for the user id ? you should have one
Same for "Save data", you need to have a WEHRE to update, so if you want to save a new record sometimes or update other times then you will need 2 Save Data actions in a switcher, the switcher will check if the Read Data returned a record or not
Your WHERE in both actions will look like this:
user_id = {user:id} // user_id is the table column where you store the user's id
and your Event Switcher "Value" will be {var:read_data_name.user_id}, replace "read_data_name" with the name of your read data action
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
actually you do not need a switcher,use 2 Save Data actions, one for Insert and one for update, and control them using the "Run Conditions" behavior in each one, for the one to insert:
for the one to update you should make the Comparator "Is NOT Empty"
*Alternatively you could have another Read Data in the "submit" and place the Insert in "Record not found" of Read Data, and the Update in the "Record found" of Read data
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Hi ralphg
The new v8.0.32 update has a new Save Data behavior called "Where Conditions", you can control if the conditions will run (update) or not (insert), that means you can have just one Save Data action, the condition will be just like my latest post image, but in the "Where Conditions" not "Run Conditions"
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?