Forums

Saving data in V6 for general and repeatable data

CKEtest 11 Mar, 2019
Hi

We have a form where up to 6 people can register to an event. The form contains a general part like organisation name, address etc. and a repeatable part, like name, surname etc. for each person to register. The repeatable part has been implemented as repeater area.

We would ike to store the form data into a database, one record per person containing all data, the general and individual/repeatable ones. We are struggling with the implementation.

How to insert both parts, general and individual/repeatable in a save data event ?
Max_admin 11 Mar, 2019
Answer
1 Likes
Hello,

So one record for the whole organization record and the persons ? if yes then the demo repeater form included in the installer will do that if you add a "Save data" action to the form.

But if you want to save the persons in another table with one person per record then you need a Loop Event action with a "save data" inside, set the "Data provider" of the Loop Event to the persons repeater data set in the data array, it should be {data:Guest} if you are testing with the demo form!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
CKEtest 11 Mar, 2019
Hi Max

Thank you for your support. I added a Loop Event Action with Sava Data inside. In there I disabled the Auto save fields. To have the general data added for each person to the database, I enhanced the fields in the Data override on Insert (e.g. organisation:{data:organisation}).

Best regards
healyhatman 12 Mar, 2019
Data override on insert would more likely be e.g. databasefieldname:{var:loop_event#.row.formfieldname}
Max_admin 06 May, 2019
Hi,

For quick form data saving including the repeater data, use the new "Log data" setting in v6.1

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
CKEtest 06 May, 2019
Hi Max

Thank you for letting me know. I will try the new feature in the next form.

Best regards
This topic is locked and no more replies can be posted.