Welcome Guest, Not a member yet? Register   Sign In
Checkbox re-population problems
#1

[eluser]Wayne Smallman[/eluser]
Hi guys!

Having tried everything I can find an example of, and failed, I need someone to explain how I'm supposed to re-populate a checkbox.

I've tried the examples in the User Guide, I've also tried numerous examples in the Forums, and nothing works.

The checkbox is not mandatory and is not checked by default.

I've reverted all of my code back to what I had originally, which is...

In the controller:
Code:
$arrayAttr['form']['stay_dinner'] = array(
'name' => 'stay_dinner[]',
'id' => 'stay_dinner',
'type' => 'checkbox',
'value' => $this->form_validation->set_value('stay_dinner')
);
In the view:
Code:
<dd>&lt;?php echo form_checkbox($form['stay_dinner']);?&gt;</dd>
Any assistance would be greatly appreciated.




Theme © iAndrew 2016 - Forum software by © MyBB