Text Input: values, types and events
Collect one text-based value and bind it into the page.
Collect one text-based value and bind it into the page.
Before you begin
Section titled “Before you begin”- An App Connect page; a named form when the values will be submitted.
Choose an input that matches the value
Section titled “Choose an input that matches the value”Use Text Input for single-line text, email, numeric, date/time and similar browser controls. Choose Checkbox, Radio, File Input or Select for their distinct value models.
Configure the field
Section titled “Configure the field”Select the input in App Structure.
| Control or value | Meaning and use |
|---|---|
| ID / Name | ID identifies the component in expressions; Name identifies the field in the submitted request. Use titleInput and title when those are the intended page and server names. |
| Type | Select text, hidden, color, date, datetime-local, time, email, month, number, password, search, tel, url, week or range. Browser presentation varies; choose a type for the actual data and validate it at the server. Hidden is not private or trusted. |
| Placeholder | A short input hint. Keep a separate visible label; placeholder text disappears when a value is entered. |
| Static Value / dynamic Value | Static Value supplies initial text. Bind dynamic Value for a record field, knowing later source changes can overwrite the current input and its reset default. |
| Required / Disabled / Read Only | Validation and editing/submission behavior. Required does not make a disabled field submit. |
| Shared dynamic attributes | The inspector may list attributes shared with other form controls. Rows/Cols concern textareas; image-resize attributes concern File Input. They do not give a text input those capabilities. |
Read and change a form control
Section titled “Read and change a form control”Form-control data is directly under its component name, for example titleInput.value. It is not titleInput.data.value.
| Control or value | Meaning and use |
|---|---|
| Set Value | Changes the current control value. A later change to its bound Value can replace it and also change the form-reset default. Set Value emits Updated when the value changes; it does not simulate a user Changed event. |
| Disable | Pass true to disable and false to enable. Disabled controls are omitted from normal form submission. Read Only, where the input type supports it, prevents editing while leaving the value eligible for submission. |
| Focus | Moves keyboard focus to the control. Give the field a visible label and a useful place in the form’s focus order. |
| Validate | Invokes the App Connect validation helper. Load the validation extension for this action; client validation does not replace the endpoint’s validation. |
| value / disabled / focused | Current value and UI state. Text-based controls expose strings, including most number-input reads. Convert intentionally before arithmetic. |
| invalid / validationMessage | Client validation state/message. Render a useful field error when invalid, and handle server field errors on the form too. |
| Changed / Updated | Changed accompanies user input/change handling when the value changes. Updated also accompanies programmatic value updates. Do not make an Updated handler unconditionally write a different value back into the same field. |
Example: show a live title preview
Section titled “Example: show a live title preview”Add titleInput with Name title and Type text. Bind a separate label to titleInput.value. Type Notebook and verify the label updates. Set Value to Pencil and verify Updated behavior. To display numeric zero through the installed Set Value path, use the string ‘0’: the underlying setter uses value || ”, so numeric 0 and false become empty text.
Keep user edits and defaults intentional
Section titled “Keep user edits and defaults intentional”For an edit form, load the record before the user starts typing or apply a deliberate reset/restore action. A field bound continuously to a changing source is not an independent draft. Never bind a password or hidden input as proof that a server operation succeeded.
Continue with a complete form workflow
Section titled “Continue with a complete form workflow”Use the related workflow to connect these controls to data and a verified submit result.
Check your result
Section titled “Check your result”You can configure the control, use its actual value shape and verify the example without confusing page state with a submitted or saved value.