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
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
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?
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
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?
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
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
Hi xoles,
I have replied here already:
http://www.chronoengine.com/forums/posts/t103431.html#368117
Best regards,
Max
I have replied here already:
http://www.chronoengine.com/forums/posts/t103431.html#368117
Best regards,
Max
This topic is locked and no more replies can be posted.