Forums

checkbox in database

bobmijwaard 14 Feb, 2009
Hope I have a more easy question this time:

I want to store the content of a form in a database table. Everything is stored correctly except all the checkboxes in the form. They are always presented as zero even if they are checked in the form. I tried Bool and tinyint, filling DB before sending email and after, but untill now without success.
GreyHead 15 Feb, 2009
Hi Bob,

What shows up in the $_POST array for the checkbox fields (you can see it if you turn DeBug on in the General Tab - and make sure that you don't have Redirect URL set)?

Usually this knid of problem is becasue there is an array value being returned that isn't being handled correctly somewhere along the line.

Bob
Max_admin 16 Feb, 2009
hi bobmijwaard,

Please get V3.1 and test the form and let me know if the problem still exists!

Regards
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
bobmijwaard 16 Feb, 2009
I saved the checkboxes in the DB with type VARCHAR, which is working. Of course this is not a good solution, but a work-around.

I will downlaod V3.1 shortly and come back with the results.

Thanks for your help.

Regards,

Dutch Bob
Max_admin 16 Feb, 2009
Hi Dutch Bob,

depending on your checkboxes values you need to set the field type!

Regards
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.