[eluser]LuckyFella73[/eluser]
In the set_checkbox section you have:
I guess when you first populate your form from database
this value is available but not after validating anymore,
since this value comes from your db.
Try to get the value from checkbox after submitting and
pass as a "normal" value. Of course you then have to
edit your controller a little bit in the section where
you first populate the db values in your form.
Roughly this way:
# populate first time:
1. get data from db
2. assign to your data array while looping your query:
Code:
$data['checkbox_x'] = $row->checkbox_x;
$data['parentsector_ID'] $row->parentsector_ID;
// in your form in the set_checkbox section:
Code:
set_checkbox("sector[".$parentsector_ID."][]", $checkbox_x)
3. in the validation part assign sended value again to the same $data array
Code:
$data['checkbox_x'] = $this->input->post('sector_whatever');
(maybe you have to set up a hidden input field for the $parentsector_ID value )
That should work