Is multiple insertions possible in FUELCMS?
Hello Sir,
I am a beginner in FuelCms. have a module in which I need to enter multiple data of the form on click of Save button at once.
As we are aware that FuelCms gets data in array form to store in database .So, my question is "Can I enter multiple data with unique entries on click of single button using one form only and on_before_save method will help me to do so ?".
Comments
http://docs.getfuelcms.com/general/forms#template
Additionally, you can use serialized fields to save a JSON representation of the data stored:
http://docs.getfuelcms.com/general/models#serialized
Thank you.
Single form data is only getting stored in database using Template field type even after filling 2 or more forms.And i made my fields serialized using
public $serialized_fields = array('fields_name1','fields_name2');
in the model page which isn't working and even on_before_save() hooks shows that only single form data in array is getting passed on.
Sir,What should I do now to solve this?
Thanks in advance.
function on_after_save($values) { $data = $this->normalized_save_data; print_r($data); exit(); }