Save fields from repeater area in one row

se serguei_kp 11 Feb, 2019
Hello my friends, please help if you can!
I need to save data from Repeater area to a single row, data must be separated by comma.
Until now I managed to save it in separate rows.
​
​
Here are some details about my form and it's fields:
Name:
Email:
Repeater area
Pick Up date:
​
Fields Name and Email are not repeated, only Pick Up date is repeated by clicking on button (class:multiply).
So I would like to have in one row: Name, Email and several Pick Up dates separated by commas.
​
How can I save it in database in such way?
​
Save fields from repeater area in one row image 1
Save fields from repeater area in one row image 2
Save fields from repeater area in one row image 3
Save fields from repeater area in one row image 4
​
Thank you in advance.
Gr GreyHead 23 Feb, 2019
Hi serguei_kp,
​
You can use custom code to assemble the user data into a string.
​
But that is usually not a very helpful format to save it in. JSON encoding or a second database table might make it more accessible.
​
Bob
he healyhatman 23 Feb, 2019
Two options.
Have a second database table that you save each line to, related to the first table.
OR
Remove the loop, save the data in one go with {data.jsonen:Model}
Max_admin Max_admin 06 Mar, 2019
Hi ,
​
With the latest update the repeater fields should be saved in one row but you have to pay attention to the fields names, please check the repeater demo form included!
​
Best regards
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.