I seem to be running into something really nasty:
I have a form which contains a group of checkboxes. I have set up validation rules for my form, and just added an empty one for my checkbox group. However, after validating my form and giving an error, it only rechecks the last one in the group that was selected. This is just driving me nuts, since the user will never notice it was unchecked!
for now, before building up the system, I just hardcoded the form to check if it works how I want it to work.
<fieldset>
<legend>Locaties veldwedstrijden</legend>
<?php echo form_checkbox('locatie','oudenaarde', set_checkbox('locatie','oudenaarde'));?>3-7-2011 te Oudenaarde <br />
<?php echo form_checkbox('locatie','arendonk', set_checkbox('locatie','arendonk'));?>31-7-2011 Arendonk<br />
<?php echo form_checkbox('locatie','westdonk', set_checkbox('locatie','westdonk'));?>11-09-2011 Westhoek – MERKEN<br />
</fieldset>
It also has this validation rule in it:
array('field' => 'locatie','label' => '','rules' => ''),
Can anybody tell me what I'm doing wrong? I read the whole manual, but I can't find the slightest hint of what might be wrong with this code...