Portal Community

Minimal Example

{
  "id": "first-name",
  "type": "text",
  "label": "First Name",
  "required": true,
  "width": "half",
  "binding": {
    "source": "$json",
    "path": "applicant.firstName"
  }
}

Settings Reference

Text input settings live inside the settings object:

SettingTypeDefaultDescription
placeholderstringGhost text shown when the field is empty
maxLengthnumberMaximum character count; counter shown below field
minLengthnumberMinimum character count for validation
prefixstringStatic label displayed before the input (e.g., $)
suffixstringStatic label displayed after the input (e.g., .com)
autocompletestringHTML autocomplete attribute value (given-name, off, etc.)
spellcheckbooleantrueEnable/disable browser spellcheck
trimOnBlurbooleantrueStrip leading/trailing whitespace when field loses focus
readonlyDisplaytext | badgetextHow the value is rendered in view/preview modes

Validation Configuration

All validation rules go inside the validation object:

{
  "id": "username",
  "type": "text",
  "label": "Username",
  "validation": {
    "required": true,
    "minLength": 3,
    "maxLength": 20,
    "pattern": "^[a-zA-Z0-9_]+$",
    "patternMessage": "Only letters, numbers, and underscores allowed"
  }
}
RuleTypeDescription
requiredbooleanField must not be empty
minLengthnumberMinimum character count
maxLengthnumberMaximum character count
patternstring (regex)JavaScript regex pattern the value must match
patternMessagestringCustom error message shown when pattern fails
customRulestringName of a registered custom validator function

Prefix and Suffix Adornments

Use prefix/suffix to add context labels that appear inside the input border:

{
  "id": "website",
  "type": "text",
  "label": "Website",
  "settings": {
    "prefix": "https://",
    "suffix": ".com",
    "placeholder": "yoursite"
  }
}

// Rendered display: [ https:// | yoursite | .com ]

Character Counter

When maxLength is set, a live character counter appears below the field (12 / 50). The counter turns red when the user approaches the limit (within 10% of maxLength):

{
  "id": "bio",
  "type": "text",
  "label": "Short Bio",
  "settings": {
    "maxLength": 150,
    "placeholder": "Describe yourself in 150 characters or less"
  }
}

Pattern Validation Examples

Use CasePattern
Alphanumeric only^[a-zA-Z0-9]+$
US ZIP code^\d{5}(-\d{4})?$
Phone (basic)^[\d\s\-\(\)\+]{7,15}$
No special chars^[^<>"'`]+$
UUID format^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

Full Example — Employee Name Fields

{
  "id": "first-name",
  "type": "text",
  "label": "First Name",
  "required": true,
  "width": "half",
  "order": 1,
  "settings": {
    "placeholder": "Enter first name",
    "maxLength": 50,
    "autocomplete": "given-name",
    "trimOnBlur": true
  },
  "binding": {
    "source": "$json",
    "path": "employee.firstName"
  },
  "validation": {
    "required": true,
    "minLength": 2,
    "maxLength": 50,
    "pattern": "^[a-zA-Z\\s\\-']+$",
    "patternMessage": "Name may only contain letters, spaces, hyphens, and apostrophes"
  }
},
{
  "id": "last-name",
  "type": "text",
  "label": "Last Name",
  "required": true,
  "width": "half",
  "order": 2,
  "settings": {
    "placeholder": "Enter last name",
    "maxLength": 50,
    "autocomplete": "family-name",
    "trimOnBlur": true
  },
  "binding": {
    "source": "$json",
    "path": "employee.lastName"
  },
  "validation": {
    "required": true,
    "minLength": 2,
    "maxLength": 50
  }
}
trimOnBlur Default trimOnBlur is true by default. This means the value written to the form model never contains leading or trailing whitespace. Disable it only for fields where whitespace is semantically meaningful (e.g., a code snippet field).