Fields

Single Line Text

Single Line Text is the standard text input field.

Use this page to see the default markup, preserve the required attributes when overriding templates, and identify the state attributes that matter for text inputs.

Preview

Attributes

Single Line Text fields span an outer field wrapper plus the actual <input>.

Field

AttributeDescriptionImportance
data-formie-field-handleStable field identity used by validation, conditions, calculations, and error renderingRequired
data-formie-field-type="single-line-text"Field-type marker on the outer wrapperRecommended

Field input

AttributeDescriptionImportance
nameSubmission payload key for the field valueRequired
data-formie-inputGeneric input marker included in normal Formie outputRecommended
data-formie-input-idStable input identity for browser behavior and module targetingRecommended
data-formie-single-line-text-inputText-input selector used by text-specific enhancements such as text-limitRequired for text-specific modules
data-formie-input-type="text"Server-rendered input-type metadataRecommended
data-formie-required-messageCustom required-rule message payloadOptional
data-formie-input-error-stateInitial server-rendered error stateOptional
aria-describedbyConnects instructions and errors for accessibilityRecommended

Styling classes

These classes are for presentation only. They are not behavior requirements:

Field input

ClassDescription
formie-inputBase input styling and focus treatment
formie-single-line-text-inputSingle Line Text styling class
formie-input-errorError-state styling class

Accessibility notes

  • Inputs with errors should receive aria-invalid="true".
  • Error rendering should keep aria-describedby references stable.
  • Required and error state should be conveyed visually and programmatically.
Last updated: May 6, 2026, 3:46 PM