form_checked

Allow you to select a checkbox or a radio button

Parameters
string $name

The field name of the checkbox or radio button

#
mixed $value

The value to check against

#
mixed $defaultValue = null

The default selected value (optional)

#
Returns
string

'checked="checked"' if the option is found, otherwise the empty string returned