Input field

The do-everything input field. Its input type decides what it becomes: plain text, number, date, time, multi-line text area or rich text editor. It is therefore the most frequently used block on a form, and the one whose settings are worth reading in full at least once.

What it is

TypefieldText
Categoryform
Children allowed0
Styling targetsbspk, input, label
EventsonChange, onInput

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
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 formdefault: no
Field type
vl_InputType
select (integer)—default: 0
Field name
vt_FieldName
text (text)—required

Label & texts

SettingHow it is setWhat it doesSpecifics
4D code for label
vb_Use4dCodeForLabel
toggle (boolean)—default: no
Label position
vl_LabelPosition
checkbox (integer)—default: 0
Explanatory text
vt_ExplanatoryText
text (text)Shows a « ? » icon next to the field label; this text appears as a tooltip on hover (like this one)translatable
Field label
vt_FieldLabel
text (text)—translatable
Indicative text
vt_FieldPlaceholder
text (text)Grayed text displayed INSIDE the field, which disappears as soon as you start typing (HTML placeholder)translatable

Input & behavior

SettingHow it is setWhat it doesSpecifics
Accept empty value
vb_AcceptEmptyValue
toggle (boolean)—default: no
Multilingual
vb_MultiLang
toggle (boolean)—default: no
Remove autocomplete
vb_RemoveAutocomplete
toggle (boolean)—default: no
Resizable
vb_Resize
toggle (boolean)—default: no
Rich text editor
vb_RichText
toggle (boolean)Replaces the text area with the dev-panel rich text editor (bold, headings, lists, links…). The content is sent as base64-encoded HTML in the field — decode it in 4D. For a different editor, leave unchecked and set it up via custom.jsdefault: no
Text color
vb_RichTextColors
toggle (boolean)Adds a text color picker to the toolbar. When unchecked the editor knows no color: colored text pasted into the field loses its colordefault: no
Highlight
vb_RichTextHighlight
toggle (boolean)Adds highlighting (text background color) to the toolbar. When unchecked, a highlight pasted into the field is removeddefault: no
Show-password toggle
vb_ToggleShowPassword
toggle (boolean)—default: no
Use 4D for default
vb_Use4DForDefaultValue
toggle (boolean)—default: no
Is linked to the module entity?
vb_isLinkedToModuleEntity
toggle (boolean)Links the field to the page module entity (record): the value is pre-filled from the entity and sent back with the form to update it. Only works on a module page with a loaded entitydefault: no
Step: Max number
vl_InputNumericMax
number (integer)—
Step: Min number
vl_InputNumericMin
number (integer)—
Increment step
vl_InputNumericStep
number (integer)—
Number of rows
vl_Rows
number (integer)—
Relationship path
vt_HowGetPk
text (text)Optional 4D expression returning the entity to link (e.g. ds.CLIENT.get(...)). Leave empty = current entity of the module page
Text color picker
vt_RichTextColorMode
select (text)—default: palette
Text color palette
vt_RichTextColorPalette
colorList (text)Colors offered in the toolbar, in the displayed order (drag and drop to change it). No color chosen: default palette. In « Color palette » mode, only these colors are accepted, pasted text included
Highlight color picker
vt_RichTextHighlightMode
select (text)—default: palette
Highlight palette
vt_RichTextHighlightPalette
colorList (text)Colors offered in the toolbar, in the displayed order (drag and drop to change it). No color chosen: default palette. In « Color palette » mode, only these colors are accepted, pasted text included
Default value
vt_Value
text (text)—
Path in object
vt_pathInObject
text (text)For a field linked to an entity: path of the OBJECT attribute where the value is read/written. The value becomes Entity.path.fieldName (e.g. field name = phone, path = contact → Entity.contact.phone). Leave empty if the field maps directly to an entity attribute

Validation

SettingHow it is setWhat it doesSpecifics
Required field
vb_Required
toggle (boolean)—security check, default: no
Maximum length
vl_MaxLength
number (integer)Maximum number of characters typed (maxlength attribute), also checked on save. Match it to the size of the Alpha field that receives the value: 4D silently cuts what exceeds it. Empty or 0 = no limit. No effect on the rich text editorsecurity check
Validation (regex)
vt_PregMatch
select (text)—open list
Required-if query
vt_QueryRequired
text (text)4D expression evaluated at render time: if it returns True, the field becomes required (conditional requirement). E.g.: WebUser.role = « admin ». Leave empty = always required

Traps

4D silently cuts a value that is too long for an Alpha field. If the table field that receives the input is a 62-character Alpha, a 70-character address is saved without its last 8 characters, with no message on screen or in the logs. Set the input field's maximum length to the size of the Alpha field (shown in the structure editor): the browser stops typing beyond it, and saving refuses a longer value sent any other way. A Text field has no limit. The maximum length has no effect on the rich text editor.

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