I am trying to submit simple form data along with multiple checkbox options.
But on form validation, these checkbox options return unchecked.
View Code
<?php echo form_checkbox( array('id' => 'check_passport', 'name' => 'purchaser_meta[]','value'=>'Passport','class'=>'form-check-input' )); ?>
<?php echo form_label('Passport','check_passport');?>
<?php echo form_error('resident_passport'); ?>
Controller Code
$this->load->library('form_validation');
$this->form_validation->set_rules('purchaser_meta','Purchaser Type Meta','trim|required');
Though, it catches the values submitted from these check boxes.
Like $this->input->post('purchaser_meta') returns the array of values submitted array(3) { [0]=> string(8) "Passport" [1]=> string(4) "Visa" [2]=> string(11) "ID" } .
Have a look on these images further.
Submitting form with options checked
After submitting form / form_validation occurred
Problem: I want these check boxes remain checked upon form validation errors. I don't know what i am missing here?

