I added Save Data to my event, but it is not saving all fields.
I have one field called "dob". Also, I have a php code that calculates age based on DOB and it generates [age]. What/where do I need to tell the "Save Data" event to save all these fields.
Here is my debug report:
I have one field called "dob". Also, I have a php code that calculates age based on DOB and it generates [age]. What/where do I need to tell the "Save Data" event to save all these fields.
Here is my debug report:
Array
(
[option] => com_chronoforms6
[chronoform] => age_calculator
[event] => submit
[dob] => 06/21/1976
[button2] =>
[age] => 40
)
Array
(
[save_data8] => Array
(
[data] => Array
(
[created] => 2017-04-09 16:40:16
[user_id] => 0
)
[_success] => Data saved successfully
[log] => Array
(
[0] => INSERT INTO `ip8gb_chronoengine_chronoforms_data_age_calculator` (`created`, `user_id`) values ('2017-04-09 16:40:16', '0');
)
[var] => Array
(
[created] => 2017-04-09 16:40:16
[user_id] => 0
[aid] => 8
)
)
)
Hi omidhz,
Your table has all these fields ? if yes then did you modify it ? if yes then please open the "Clear database cache" page.
Best regards,
Max
Your table has all these fields ? if yes then did you modify it ? if yes then please open the "Clear database cache" page.
Best regards,
Max
Thank you Max for your reply.
My table has all the fields from the form. The only one that was missing was AGE (this is calculated in my php code based on the data from DOB form field). I added that field to the database manually. See screenshot SQL Table.
I have already tried "Clear database cache" but did not help.
I also included a screenshot of my Save Data event and the result of the data saved. I still can't figure out why other data are not saving to the DB.
My table has all the fields from the form. The only one that was missing was AGE (this is calculated in my php code based on the data from DOB form field). I added that field to the database manually. See screenshot SQL Table.
I have already tried "Clear database cache" but did not help.
I also included a screenshot of my Save Data event and the result of the data saved. I still can't figure out why other data are not saving to the DB.
Hi omidhz,
The data provider should be set to {data:}, which means get the data to save from the post/get values.
Best regards,
Max
The data provider should be set to {data:}, which means get the data to save from the post/get values.
Best regards,
Max
This topic is locked and no more replies can be posted.