Buy Now
Sign in

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

jcalvert , September 01 2017
J
jcalvert
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
Attachments
screenshot1.png
screenshot1.png
(61.58 KiB)
236 Downloads/Views
W
webuniverse
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.
admin
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
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
J
jcalvert
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
admin
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
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
D
Denny87
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
Attachments
repeater.PNG
repeater.PNG
(23.49 KiB)
97 Downloads/Views
setup.PNG
setup.PNG
(29.92 KiB)
103 Downloads/Views
GreyHead
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
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
D
Denny87
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