Hi
I have a form with a check box fields (the user can make multiple choise).
I have created an associated table to this form and activated a db save action.
It works except for check box values as only the first one selected is stored.
I think the problem is the field structure in db table: as default is set to VARCHAR
Could you help me?
Thank you
Hi giulia72,
Your checkbox group can return multiple values so it needs to have an array name ending in [] e.g. checkbox_1[]
To save the selected values in a database table you need to convert the array into a comma separated string. You can do this with a Handle Arrays action in the form On Submit event before the DB Save action.
Bob
Hi Bob
I have added Handle array action but nothing happens , same result.
Do I have to do any other configuration?
Hi guilia72,
Please drag a Debugger action into the On Submit event, then submit the form and copy and paste the debug results here.
Bob
Hi Bob
it works
I missed to insert [ ] in the field namme of array
Do you know if it s possible the array values can be stored in different columns in the db table?
Hi giulia72,
You could use a Custom Code action to break the array up into separate entries in the $form->data array - or you could use a second table linked to the first to store them.
Bob
ok for the moment I will leave it as it it
Hello! What or where would the "handle array action" be on CFv6 ?
Hi xoles,
I have replied here already:
http://www.chronoengine.com/forums/posts/t103431.html#368117
Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?