Checkbox

Checkboxes. A group of options all shown at once, fed by a list or by a 4D function. Prefer it over the dropdown when the options are few and you want the user to see them all without clicking.

What it is

TypefieldCheckbox
Categoryform
Children allowed0
Styling targetsbspk, legend, fieldset, input, label
EventsonChange

The settings

Only the settings specific to this block are listed here. The block name, HTML id, anchor, conditional display and repetition are shared by every block and described once, under Shared settings.

Parameters

SettingHow it is setWhat it doesSpecifics
Field name
vt_FieldName
text (text)—required

Label & texts

SettingHow it is setWhat it doesSpecifics
Right
vb_RevertLabel
toggle (boolean)—default: no
Align inputs
vb_SpaceBetween
toggle (boolean)—default: no
Group Label
vt_FieldLabelGroup
text (text)—translatable

Filling

SettingHow it is setWhat it doesSpecifics
Fill from a function
vb_UseFunction
toggle (boolean)Fills the list from a 4D function instead of a fixed list. Requires the class + function pair, and the function must be listed in the registry: after writing it, refresh the Storage, otherwise it will not show up.default: no
List of possible values
vc_Values
textarea (text)One value per line. Each line can be a translation key or free text.
Function parameters
vo_ValuesParams
functionParams (object)—
Class
vt_ValuesClass
select (text)—required
Function
vt_ValuesFunction
select (text)—required

Input & behavior

SettingHow it is setWhat it doesSpecifics
Button effect
vb_EffectButton
toggle (boolean)—default: no
Send only the box check
vb_SendOnlyBoxChecked
toggle (boolean)—default: no
Is linked to the module entity?
vb_isLinkedToModuleEntity
toggle (boolean)—default: no
Type of value
vl_InputSubType
checkbox (integer)—default: 0
Field type
vl_InputType
checkbox (integer)—default: 1
Default value
vt_DefaultValue
text (text)—translatable
Relationship path
vt_HowGetPk
text (text)Path from the page entity to the one actually holding the value — e.g. Entity.MyCustomer. Left empty, the value is read on the page entity.
4D value
vt_Value
text (text)—accepts 4D

Validation

SettingHow it is setWhat it doesSpecifics
Required field
vb_Required
toggle (boolean)—security check, default: no
Required condition
vt_QueryRequired
text (text)Only read when the field is already marked required: the expression then decides, on each validation, whether it truly is. Must return a boolean. Skipped on a plain block reload.

The tables on this page are produced automatically from the block's schema. If this page and the panel disagree, the schema is right.