Text field
Single-line text input, the foundation field for names, codes, and short free-text.
The Text field is a single-line input for short free-text values: names, codes, reference numbers, anything that isn't a date, number, or choice.
It maps to SharePoint's Text column type and is the most common field on a form.
Common properties
| Property | Description |
|---|---|
labelstring | Visible label above the input. |
descriptionstring | Helper text rendered under the label. |
placeholderstring | Greyed example text shown when the input is empty. |
requiredboolean default: false | Marks the field with a red asterisk and blocks submit when empty. |
readOnlyboolean default: false | Renders the value but disables editing. |
visibleIfexpression | Hide the field unless the expression returns true. See the rules reference. |
Type-specific properties
| Property | Description |
|---|---|
maxLengthnumber default: 255 | Maximum character count. SharePoint Text columns cap at 255. |
patternregex string | A regular expression the value must match for the field to validate. |
inputMode"text" | "tel" | "url" | "email" default: "text" | Hints the right on-screen keyboard on mobile. |
JavaScript recipes
Get the current value
const code = f365.field('JobCode').value;
Set the value programmatically
f365.field('JobCode').value = 'JOB-001';
Listen for changes
f365.field('JobCode').on('change', (next) => {
console.log('JobCode changed to', next);
});
Hide the field conditionally
f365.field('JobCode').visible = f365.field('Department').value === 'Engineering';
Related
Related articles
- Textarea field
Multi-line free text, for paragraphs, descriptions, notes, and anywhere a single-line text field would overflow.