$this->crud->addField([
'name' => 'status',
'label' => 'Featured item',
'type' => 'checkbox',
]);
The generated code is following:
<div class="form-group col-md-12">
<div class="checkbox">
<label>
<input type="hidden" value="0" name="status">
<input type="checkbox" name="status" value="1"> Featured item
</label>
</div>
</div>
Using the above code for checkbox, Everything works fine, value is saving correctly in database and fetched correctly. But checkbox is not checked.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire