This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Greetings,
I am using builder plugin to create forms to store data into database. By default, each model belongs to a single database table. And a form can store the data into a single database table. So how to Insert data into 2 different tables captured from a single form using Builder Plugin.
Regards
garden said:
Greetings,
I am using builder plugin to create forms to store data into database. By default, each model belongs to a single database table. And a form can store the data into a single database table. So how to Insert data into 2 different tables captured from a single form using Builder Plugin.
Regards
Hi. You need to use an event function(beforeSave for ex.) in your model: https://octobercms.com/docs/database/model#events
Inside this function you can do everything you want. https://octobercms.com/docs/database/query#inserts
1-2 of 2