Welcome Guest, Not a member yet? Register   Sign In
Repopulating Arrays of checkboxes
#1

[eluser]Unknown[/eluser]
I've looked through the forums and other than modifying certain core files there seems to be no fix that is up to date ... meaning I haven't found one that wasn't over 2 years old. I have an array of check boxes representing towns a person could work in ... example ...

<INPUT TYPE=CHECKBOX NAME="coverage_areas[]" value="Cape Cod"<?php echo set_checkbox('coverage_areas[]', 'Cape Cod');?>/>Cape Cod

<INPUT TYPE=CHECKBOX NAME="coverage_areas[]" value="Boston"<?php echo set_checkbox('coverage_areas[]', 'Boston');?>/>Boston

<INPUT TYPE=CHECKBOX NAME="coverage_areas[]" value="Providence"<?php echo set_checkbox('coverage_areas[]', 'Providence');?>/>Providence

the only validation id do on this is the

$this->form_validation->set_rules('coverage_areas', 'Coverage Areas', 'required);

when the form is submitted and an error occurs the check boxes that were checked are not repopulated ... anyone got any ideas, as I said I've pretty much tried everything I came across.


Messages In This Thread
Repopulating Arrays of checkboxes - by El Forum - 04-05-2011, 09:28 AM
Repopulating Arrays of checkboxes - by El Forum - 04-05-2011, 10:06 AM



Theme © iAndrew 2016 - Forum software by © MyBB