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

PropertyDescription
label
string
Visible label above the input.
description
string
Helper text rendered under the label.
placeholder
string
Greyed example text shown when the input is empty.
required
boolean
default: false
Marks the field with a red asterisk and blocks submit when empty.
readOnly
boolean
default: false
Renders the value but disables editing.
visibleIf
expression
Hide the field unless the expression returns true. See the rules reference.

Type-specific properties

PropertyDescription
maxLength
number
default: 255
Maximum character count. SharePoint Text columns cap at 255.
pattern
regex 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 articles

  • Textarea field

    Multi-line free text, for paragraphs, descriptions, notes, and anywhere a single-line text field would overflow.