Select
The dropdown. Its values come from a fixed list, a 4D function or a table of the database, and it can accept several choices at once. Type-ahead search is built in: on a long list this is the block to use rather than a row of checkboxes.
What it is
| Type | fieldSelect |
| Category | form |
| Children allowed | 0 |
| Styling targets | bspk, select, label |
| Events | onChange, onSearch |
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
| Setting | How it is set | What it does | Specifics |
4D code for the field name
vb_Use4dCode | toggle (boolean) | The field name is a 4D expression evaluated at render time: its result becomes the field name sent with the form | default: no |
Field name
vt_FieldName | text (text) | — | required |
Label & texts
| Setting | How it is set | What it does | Specifics |
4D code for label
vb_Use4dCodeForLabel | toggle (boolean) | — | default: no |
Label position
vl_LabelPosition | checkbox (integer) | — | default: 0 |
Field label
vt_FieldLabel | text (text) | — | translatable |
First option value
vt_LabelFirstOption | text (text) | Text shown while no value is selected: the placeholder of the empty option. | translatable |
Filling
| Setting | How it is set | What it does | Specifics |
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
| Setting | How it is set | What it does | Specifics |
Free entry
vb_Combobox | toggle (boolean) | The field accepts a value outside the list: the user can type their own. On reload, a value missing from the list is added back so it stays displayable. | default: no |
multiple choice
vb_Multiple | toggle (boolean) | — | default: no |
Use Tom Select rendering
vb_TomSelect | toggle (boolean) | — | default: no |
Is linked to the module entity?
vb_isLinkedToModuleEntity | toggle (boolean) | — | default: no |
Linked to a url parameter
vb_isLinkedToUrlParameter | toggle (boolean) | — | default: no |
Field type
vl_InputType | select (integer) | — | default: 0 |
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. | |
URL parameter name
vt_UrlParameterName | text (text) | — | |
Default value
vt_Value | text (text) | — | translatable |
4D value
vt_Value4D | text (text) | — | accepts 4D |
Validation
| Setting | How it is set | What it does | Specifics |
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.