Documentation Index
Fetch the complete documentation index at: https://mintlify.com/formsmd/formsmd/llms.txt
Use this file to discover all available pages before exploring further.
Overview
ThetextInput method creates a text input field for collecting single-line text responses. It provides validation options, placeholders, and customization parameters.
Method Signature
Parameters
The unique identifier for this input field. Used to reference the value in form submissions and logic conditions.
Required Parameters
The main question or label displayed to the user.
Input-Specific Parameters
Sets the
placeholder attribute of the input.When set to
true, the input accepts values with multiple lines using the <textarea> element. See textareaInput for multiline usage.Sets the maximum number of allowed characters in the input.
Regular expression pattern that the input value must match for validation.
Sets the default value of the input.
Shared Parameters
When set to
true, the field becomes required and the user must provide a value before proceeding.Additional information displayed below the question to help users fill out the form.
When set to
"sm", the font sizes of the question, description, and answer are made smaller.When set to
"classic", the question and description of the form field are made smaller.When set to
true, the question and description of the form field are made smaller (for nested fields).When set to
true, the input is disabled and cannot be edited.When set to
true, the input will be automatically focused when the parent slide becomes active or immediately after page load.The
id attribute of the form field element.Array of CSS class names to apply to the form field.
Array of custom HTML attributes to apply to the form field. Each attribute has a
name and value property.Conditional logic to control when this field is displayed.
Examples
Return Value
Returns a string containing the Forms.md markup for the text input field.Related Methods
textareaInput
Multiline text input using textarea element
emailInput
Email input with built-in validation
numberInput
Numeric input with constraints
passwordInput
Password input with masked characters