Boolean
Purpose: setting states on the yes/no principle
Field type in SQL table: tinyint (0/1)
Additional parameters:
required
Purpose: makes this field mandatory to fill when creating/editing a record, for the bool type this property in forms means rather a call to pay attention and put a tick (for example, 'I agree with the rules', 'I confirm', i.e. to pass the check in the form you need to check this field).
Possible values: true, false
Default: false
on_create
Purpose: initial value of the field when creating a new record in the table
Possible values: true, false
Default: false
quick_change
Purpose: in the admin panel, it allows you to quickly change the field value by clicking on the icon (toggle switch) in the general table of model records.
Possible values: true, false
Default: true
Examples:
['Activate', 'bool', 'active']
['Display in menu', 'bool', 'in_menu', ['on_create' => true]]
['New', 'bool', 'new_product']
['Display on main', 'bool', 'index_page']
Previous section
General characteristics