Save data to different tables

Hello,

I would like to know if you have the possibility to save the data of a form in different tables. Because I have a main form but the data should be saved in different tables for better control of the information.
Does Chronoforms enable this?
Max_admin 14 Mar, 2019
Hi Ricardo,

Yes, just use multiple "Save data" actions, leave the "Data provider" empty and list the fields your want to save along with their values in the "Insert override" box!

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
bkgraf 15 Mar, 2019
Hello, good afternoon, can you give me an example? I do not understand how to do it.
Max_admin 16 Mar, 2019
I explained in the post how its done, maybe you can give more info about your requirements ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
bkgraf 16 Mar, 2019
Hi, thanks for answering.

I have a form, there you must enter the data and when saving, you must fill in different tables. (Attached the model entity realization to see what I want to do). Save data to different tables image 1 Save data to different tables image 2
I can only sleect a table that is where you send me the information.
 Save data to different tables image 3

I do not know where to put the other options to "save data" and that I fill the other tables.

Now is it a little clearer?
healyhatman 17 Mar, 2019
Answer
1 Likes
You need multiple save data actions, one for each different table you want to save into.
bkgraf 27 Mar, 2019
Hi, could you tell me how to do it?or any example of where you can guide me?In a SAVEDATA how do I separate the fields that I will save in a table?In the other SAVEDATA should I put the missing fields to save in the other table?Sorry but I do not know how to do it.I appreciate your cooperation and instructions!
healyhatman 27 Mar, 2019
Put the data you want saved in one database in one save data action, put the data you want saved in the other database into the other save data action.
bkgraf 28 Mar, 2019
healyhatman, thanks for answering.Excuse my ignorance, I will try to be a little more explicit in what I need.

I have a form in Chronoforms V6, from there I have the fields to enter the information.

 Save data to different tables image 4

As you can see in the image I must insert records in three different tables.

That's where I do not know how to configure the SAVEDATA to save correctly.

I do not know how to tell you which fields to keep in one table and which in another.

Thanks for your help.
healyhatman 28 Mar, 2019
How do you not know? You made the fields and the tables right? Surely you know which fields you want saved to which table?
healyhatman 28 Mar, 2019
basically none of your save data actions should have "data source" filled in, not should they be set to auto save or auto manage.

Primary table you would have the fields you want in the primary table. Like
databasefieldname:{data:formfieldname}
Then in the secondary related table's save data action you would have
foreignfieldid:{var:save_data#.id}
databasefieldname:{data:formfieldname}
Where save_data# is the name of the primary save data action.
This topic is locked and no more replies can be posted.