I'm really enjoying formhandler and it's saving me a lot of time. But I want to use dbCheckBox and I can't get it to work. Please can anyone help.
I have a table structure with 10 fields in called Option1, Option2, Option3 ... Option10. They are all defined as boolean (int length 1).
I want to show 10 check boxes (one for each field) with a tick if the field is true (1) and no tick if it is false (0) and the changed value saved in the appropriate field if the user ticks or unticks one of the boxes.
I am really stuck on getting this to work - I don't think I understand the parameters for dbCheckBox and would welcome any help.
In case you want to continue with your (i.m.h.o. WRONG) databasedesign you can't use dbCheckbox and will need to declare an array with all fieldnames of your table. If you use MySQL the fieldnames of a table can be retrieved by running a query:
SHOW FIELDS FROM insert_table_name_here;
These records can be added into an array which can be used in FH's "checkbox" method.