This form create cakephp

        1. How to create checkbox in cakephp
        2. Cakephp 4 modelless form...

          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.

            Validation in cakephp

          • Validation in cakephp
          • Cakephp templates
          • Cakephp 4 modelless form
          • Cakephp 5 helpers
          • Cakephp render view in controller
          • 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