Forums

problems with saving to database

Tiko 05 Apr, 2014
Hello,
sorry for the many questions, apparently forms don't like me so much, and I really do search solutions on the forum and on the FAQ, but can't find the right answers. Anyway:
I'm just trying to simply save my inputs in a database, but for some reason things go wrong. I tried with different configurations, and or instead of thank you message I get a red block with
0 - SQL=INSERT INTO `joom_chronoengine_chronoforms_datatable_form_newsletter` (`email_adress`, `structure`, `nom`, `telephone`, `message`, `dossiers_spectacles`, `checkbox_newsletter`, `user_id`) values ('tiko_venne@yahoo.com', 'ma structure', 'Tiko VENNE', '33630496469', 'tetetetetetete', Array, '', '0');
or the thank you message works (I don't understand when it works and when not) but it still doesn't save my data. Anyway the emails to me and to user are sent everytime.
GreyHead 05 Apr, 2014
Hi Tiko,

I'm guessing that the problem is the Array entry for the checkbox group - you probably need to add a Handle Arrays action before the DB Save to convert the form data from an array to a string.

Bob
Tiko 05 Apr, 2014
I did! And I named it with the [] at the and. Really, I spent hours searching and trying...
GreyHead 05 Apr, 2014
Hi Tiko,

I don't know much about CFv5 yet :-(

Please try turning on the Debugger to see what information that gives you.

Bob
Tiko 05 Apr, 2014
the problem is when the thank you message doesn't show I can't see the debugger.
Max_admin 05 Apr, 2014
Hi Tiko,

What's your checkbox group field name ?

Please post a screenshot for the events section in your form

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Tiko 05 Apr, 2014
checkbox field_name is "dossiers_spectacles[]"
screenshots:
[attachment=4]Capture.PNG[/attachment][attachment=3]Capture2.PNG[/attachment][attachment=2]Capture3.PNG[/attachment][attachment=1]Capture4.PNG[/attachment][attachment=0]Capture5.PNG[/attachment]
Max_admin 06 Apr, 2014
The debugger shows that the handle arrays didn't do the changes, did you change anything in the handle arrays settings ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Tiko 06 Apr, 2014
[attachment=1]Capture6.PNG[/attachment][attachment=0]Capture7.PNG[/attachment]

the captur6 is the error message I just got when I wanted to check the database.
captur7 are the handle settings.
thank you for your time.
Max_admin 06 Apr, 2014
#1- did you make any changes to the db table ? please try to click the "clear cache" button under the forms manager.

#2- please clear the "fields list" box.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 06 Apr, 2014
Hi Tiko,

I'm still pretty sure that the Array is at least a part of the problem. Looking at the query again there are some columns that ChronoForms normally creates that aren't there. Are you using a ChronoForms DB Save action here?

Bob
Tiko 06 Apr, 2014
ok, I cleared the cache, and that made the error message dissapear I got instead of the thank you message. But looking at the database I didn't get any record there, so there still is a problem somewhere...
Where can I find this field list box?
This is the latest debug:
[attachment=0]Capture8.PNG[/attachment]
Tiko 06 Apr, 2014
And yes, I am using the chronoforms action.
Max_admin 07 Apr, 2014
Answer
Inside the "Handle arrays" action, please remove the field name from the "fields list" box, or simply remove the "[]", they should not be added there!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Tiko 07 Apr, 2014
ok, all good now. I emptied the handles field lis box (I didn't read completely read the info under the box, sorrie) , and I think emptying the chache also helped.
I still have some questions but on other subjects so I'll open other topics for these.
Thank you for your time.
This topic is locked and no more replies can be posted.