Forums

How to Save forms and custom information to DB in V6

omidhz 09 Apr, 2017
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:
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
                )

        )

)
Max_admin 09 Apr, 2017
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
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
omidhz 09 Apr, 2017
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.
Max_admin 09 Apr, 2017
Answer
1 Likes
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
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.