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
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.
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
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
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
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
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
