Welcome Guest, Not a member yet? Register   Sign In
Repopulating checkbox using CI syntax: confused.
#3

[eluser]e-man[/eluser]
Cheers mate! Although your second suggestion was even better:
Set up a basic validation rule for the checkbox:
Code:
$this->form_validation->set_rules('bestemming[]', 'Bestemming', 'trim|required');
then in your view you can do:
Code:
$data = array(
                      'name'        => 'bestemming[]',
                      'id'          => 'handelsruimte',
                      'value'       => 'handelsruimte',
                      'checked'        =>  ($this->form_validation->set_checkbox('bestemming[]', 'handelsruimte'))?TRUE:FALSE
                    );
Works really well, thanks!


Messages In This Thread
Repopulating checkbox using CI syntax: confused. - by El Forum - 08-23-2009, 10:59 AM
Repopulating checkbox using CI syntax: confused. - by El Forum - 08-24-2009, 12:41 AM
Repopulating checkbox using CI syntax: confused. - by El Forum - 08-24-2009, 05:12 AM
Repopulating checkbox using CI syntax: confused. - by El Forum - 12-26-2010, 03:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB