Forums

CF6 Repeater area fields - can't create database, can't save to database

jcalvert 01 Sep, 2017
I have a large form with several "Repeater area" sections, in which there are fields with "name" and "ID" with the syntax like: name{var:area_repeaterXX.key}, where "name" is the specific name for the field, and "XX" is the number of the repeater.

This method is creating the form properly, from the user's perspective.

When I attempt to "Create table" in the Form Manager, multiple form fields are not created, and I get form field titles like, "name{var:area_repeaterXX.key}" – i.e. multiple form fields are not being created (i.e. with titles like name0, name1, etc). Likewise, when I attempt to save to the table using the "Save Data" action, these fields are not being saved to the database.

I have attached a screen shot of a small test form that also exhibits this problem.

thanks for your help,
JC
webuniverse 04 Sep, 2017
I have the same Problem.

I try a Loop Event, but is still not working. Does anyone has a Printscreen of a working one? :-)

Thanks a lot for help
Corinne


From the FAQ

Saving the multiplier data

Assuming the naming convention advised above has been used, a LOOP EVENT action can be used to get the data and run a "Save data" action one time for each multiplier clone created.

The Loop Event data provider should be set to {data:Model} which is the paremt of the cloned items data sets, and the "Save data" daat provider should be set to {var:switch_action_name.row}, the "Save data" should be inside the "Body" section of the "Loop event" action.

Max_admin 06 Sep, 2017
Hello,

The Repeater fields naming convention is dependent on your usage, but if you have a "multiplier" then its better to have names in this format:
Section[field_name][{var:area_repeaterXX.key}]


Then you can loop on the values for saving.

The table created will not account for these fields and they are better stored in another table using a loop action with a "save data" action inside.

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
jcalvert 12 Sep, 2017
Max, my client needs to export one database in CSV format.

Question... Am I out of luck trying to get CF 6 to: a) create the database, b) store the Repeater area fields to the database?

I suppose if I didn't use Repeater fields it would work, by just duplicating the fields manually. I am wondering why you didn't design the code to be able to duplicate (clone) "Multi field area"?

I am still confused as to why CF 6 will show the form correctly, email the correct data, and save the data to PDF correctly; however, it won't create the database or save the data to the database.

I am hoping I won't need to abandon CF 6.

thanks,
JC
Max_admin 29 Sep, 2017
Hi JC,

Could you please post a screenshot of your repeater settings ?

The repeater has many different uses and saving the data is not something which can be done the same way in all situations.

Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
Denny87 08 Jan, 2018
Hi,

is there any solution or a another explanation how to save multiple fields in repeater area?
I have a form where i can add more fields. It savers only the last filled field. not the other ones.

What should i setup? Attached are two screenshots.

Hope anyone can help.

Thanks,
Denny
GreyHead 09 Jan, 2018
Hi Denny,

To save multiple values from the same element they have to have array names ending - otherwise you only get the last value saved. With a multifield in the repeater I'd suggest that you use names like group_name[{var:area_repeater40.key}][fieldtext_47] that will group all of the multiplier elements together.

Bob
Denny87 09 Jan, 2018
Hi Bob,

thanks for your answer. Is it possible to get a little bit more details how to setup correctly?
What do i have to do in the designer and what in the setup? That would be great...

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