Hi,
I have a form that I wish to save to db. The '$form->data' array looks good and I have the db-fields named after the array data. I have a 'DB Save' on submit, but when I try the form out I get this message:
Parse error: syntax error, unexpected '$', expecting T_VARIABLE in /storage/content/....../administrator/components/com_chronoforms/form_actions/db_save/db_save.php(63) : eval()'d code on line 33
Fatal error: Call to a member function bind() on a non-object in /storage/content/....../administrator/components/com_chronoforms/form_actions/db_save/db_save.php on line 86
I have a form that I wish to save to db. The '$form->data' array looks good and I have the db-fields named after the array data. I have a 'DB Save' on submit, but when I try the form out I get this message:
Parse error: syntax error, unexpected '$', expecting T_VARIABLE in /storage/content/....../administrator/components/com_chronoforms/form_actions/db_save/db_save.php(63) : eval()'d code on line 33
Fatal error: Call to a member function bind() on a non-object in /storage/content/....../administrator/components/com_chronoforms/form_actions/db_save/db_save.php on line 86
Hi PicoPaco,
Hard to tell from the info here but most likely a special character in an input or column name??
Bob
Hard to tell from the info here but most likely a special character in an input or column name??
Bob
I'll created a new db-table, and it seems to be working. My problem now is to have the '$form->data' array to write to the database. The DB-Save will create a nested array (default chronoform_data) from wich it will write. How can I put all values from data to chronoform_data, or get the DB to write from data?
Hi PicoPaco,
The DB Save will save the data from the $form->data array where the input names match the column names (unless you specify a special Model ID).
Bob
The DB Save will save the data from the $form->data array where the input names match the column names (unless you specify a special Model ID).
Bob
Hi Bob,
When I try to do the db-save doesn't match and save from the '$form->data' array. It only saves from the input fields from the redirect page. I can see in the debugger that the array looks like I want it to, but no saves to db from the array.
When I try to do the db-save doesn't match and save from the '$form->data' array. It only saves from the input fields from the redirect page. I can see in the debugger that the array looks like I want it to, but no saves to db from the array.
Okey, I got it to work. I had to set a 'session to data' on submit before 'DB-save'. Does this make any sense?
This topic is locked and no more replies can be posted.