Cakephp 4 modelless form
Cakephp 4 text helper...
Cakephp 5 helpers
Class CheckboxWidget
Method Detail
__construct() ¶public
Constructor.
Parameters
Templates list.
_isChecked() ¶protected
Checks whether the checkbox should be checked.
Parameters
Data to look at and determine checked state.
Returns
mergeDefaults() ¶protected
Merge default values with supplied data.
Parameters
Data array
Context instance.
Returns
render() ¶public
Render a checkbox element.
Data supports the following keys:
- - The name of the input.
- - The value attribute.
Defaults to '1'.
- - The current value. If it matches the checkbox will be checked. You can also use the 'checked' attribute to make the checkbox checked.
- - Whether the checkbox should be disabled.
Any other attributes passed in will be treated as HTML attributes.
Parameters
The data to create a checkbox with.
The current form context.
Returns
secureFields() ¶public
Returns a list of fields that need to be secured for this widget.
Parameters
Returns
setMaxLength() ¶protected
Set value for "maxlen