I have a problem repopulating a set of checkboxes after an unsuccessful form validation returns the user back to the same form. Dropdown menus and text inputs could be repopulat
You set_checkbox
calls are wrong. When you're using an array like "ambience[]" in form_checkbox, you don't want to include the square brackets ([]) in your set_checkbox
call. The other problem is that set_checkbox requires a second parameter which you've only included in the first 2 checkboxes.
The set_checkbox should always be like this:
set_checkbox('ambience', 'value');
Where 'value' is the second parameter of the form_checkbox
call. Like this:
form_checkbox('ambience[]', 'value', set_checkbox('ambience', 'value'));