CF8 how to save data in table?

How to save and update data in a database table using ChronoForms 8.

Overview

The issue occurs when the "Save Data" action is configured without proper data source and where clause settings for updates.
To save new records, ensure the data source includes {data:} and the primary key is set. To update existing records, add a where clause like "id = {data.quote:id}" to target the specific record.

Answered
ChronoForms v8
ri riccardoc 08 Sep, 2023
I know CF6 quite well and now I'm trying to start using CF8 but I can't understand how to save the data in the table. If there was a manual, even a paid one, like the one for CF6 it would be a salvation.
Currently I can read the data from the table and display it in the form fields, I use a where statement id = {data:id} so I only get the record with the id specified in the url, I added a submit button and added the "save data" action in the submit tab, I did several tests but without being able to save anything, would anyone have a backup of an example form to pass on to me so I can study the settings?
Max_admin Max_admin 08 Sep, 2023
hi,

did you add {data:} to the "data source" of the "Save data" ? you may also need to set the "primary key" behavior for this to work
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ri riccardoc 11 Sep, 2023
Great Max, I'm now able to save new records, the problem at the moment is that I can't update an existing record and the "Duplicate entry '2' for key 'aaaTEST.PRIMARY'" is reported, I think I need one more tip to go, here are the screenshots of my configuration.

https://ibb.co/HCSVxc9
https://ibb.co/hW4NfPB
Max_admin Max_admin 11 Sep, 2023
Answer
in order to update you must set the "Where" behavior:
in your case it will be something like this:
id = {data.quote:id}
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.