I found out the hard way that "DB Store" won't work with a table created with "Create table".
This post finally gave me the clues I needed to solve this: http://www.chronoengine.com/forums/posts/f26/t90090.html
The reason DB Store is not working relates to the fact that the "id" field of $form->data contains the Joomla article id. This then apparently erroneously gets used in the DB Store function to look up the database record in the table with the corresponding id, resulting in MySQL UPDATE getting used (and failing) instead of INSERT INTO. Note that the first field of the table created by "Create table" is "id", which apparently is the cause of the problem – it's the same label as "id" in $form->data.
In order to patch this problem, I made the following change to ./administrator/components/com_chronoforms5/chronoforms/actions/db_save/db_save.php :
After line 48:
$data['user_id'] = $user['id']
Add:
$data['id'] = '';
JC
This post finally gave me the clues I needed to solve this: http://www.chronoengine.com/forums/posts/f26/t90090.html
The reason DB Store is not working relates to the fact that the "id" field of $form->data contains the Joomla article id. This then apparently erroneously gets used in the DB Store function to look up the database record in the table with the corresponding id, resulting in MySQL UPDATE getting used (and failing) instead of INSERT INTO. Note that the first field of the table created by "Create table" is "id", which apparently is the cause of the problem – it's the same label as "id" in $form->data.
In order to patch this problem, I made the following change to ./administrator/components/com_chronoforms5/chronoforms/actions/db_save/db_save.php :
After line 48:
$data['user_id'] = $user['id']
Add:
$data['id'] = '';
JC