FUELPHP Form Checkbox checked

FuelPHP checkbox is not a nightmare if understand it’s parameters correctly.
The syntax is
checkbox($field, $value = null, $checked = null, $attributes = array())

To built form checkbox, simply do like below:

	echo \Form::checkbox("checkbox1", true, 'checked', array('id' => 'microsite_activate'));

Will output a checked checkbox:

To uncheck the checkbox, changed the ‘checked’ value to empty ” or null

By Keenlio, July 1, 2014

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *

seven − = 4

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>