Hi.
I've stumbled upon a strange problem.
My latest form has three fields with checkboxes where the user can make multiple choices.
For some reason the third one won't work at all. Only one choice is registered. It is the same in the admin interface. If I try to tick more than one option only one is saved on edit.
All three are made the same way, (and Yes, I use square brackets []). All three makes use of field option groups made the same way, and all three database fields look the same when i study them in the admin interface and through PHPmyAdmin.
I tried to delete the database field and the field option group and made new ones, but the same result.
Any idea on what I should look for more?
Here are some screen shots to show you.
This is the database for the three fields with checkboxes
Here are the three fields. Pass1 and pass2 works.(I have a different name on the third because I made a new one. It had the same name structure before, but didn't work then either)
This is one field that works
This is the one that doesn't work
This it the field group that is used by the one that doesn't work. It looks the same as the others.
And the HTML behind it all:
One that works (extract from it)
And the one that doesn't:
I've stumbled upon a strange problem.
My latest form has three fields with checkboxes where the user can make multiple choices.
For some reason the third one won't work at all. Only one choice is registered. It is the same in the admin interface. If I try to tick more than one option only one is saved on edit.
All three are made the same way, (and Yes, I use square brackets []). All three makes use of field option groups made the same way, and all three database fields look the same when i study them in the admin interface and through PHPmyAdmin.
I tried to delete the database field and the field option group and made new ones, but the same result.
Any idea on what I should look for more?
Here are some screen shots to show you.
This is the database for the three fields with checkboxes
Here are the three fields. Pass1 and pass2 works.(I have a different name on the third because I made a new one. It had the same name structure before, but didn't work then either)
This is one field that works
This is the one that doesn't work
This it the field group that is used by the one that doesn't work. It looks the same as the others.
And the HTML behind it all:
One that works (extract from it)
PHP Code:
<label>
<input type="checkbox" name="pass2[]" value="7" id="pass2_0" <?php if (@in_array("7", $fields["pass2"])) echo "checked=\"checked\""; ?> />(7) Nya kursplaner grundskolan –Skola 2011</label>
<br />
<label>
<input type="checkbox" name="pass2[]" value="8" id="pass2_1" <?php if (@in_array("8", $fields["pass2"])) echo "checked=\"checked\""; ?> />(8) Nya kursplaner gymnasiet –Gy2011</label>
<br />
<label>
PHP Code:
<label>
<input type="checkbox" name="pass3[]" value="14" id="pass3_0" <?php if (@in_array("14", $fields["pass3"])) echo "checked=\"checked\""; ?> />
(14) Yoga i skolan</label>
<br />
<label>
<input type="checkbox" name="pass3[]" value="15" id="pass3_1" <?php if (@in_array("15", $fields["pass3"])) echo "checked=\"checked\""; ?> />
(15) Framtidens specialidrott</label>
<br />
<label>