Input types
Text-based inputs with built-in validation for collecting various types of data
Input question types are the foundation of most surveys and forms. They allow respondents to enter text, numbers, dates, and other structured data. Each input type includes appropriate validation to ensure data quality.
All input types are available for both surveys and forms.
Text
Single-line text input for short responses like names, titles, or brief answers.
Use cases
- • Name, company, or job title
- • Short answers to open-ended questions
- • Product or feature names
- • Any single-line text response
Example configuration
{
"question_text": "What is your full name?",
"question_type": "text",
"is_required": true,
"min_length": 2,
"max_length": 100
}Configuration options
- min_length - Minimum number of characters (optional)
- max_length - Maximum number of characters (optional)
- is_required - Whether the question must be answered
Textarea
Multi-line text input for longer responses, comments, and detailed feedback.
Use cases
- • Detailed feedback or comments
- • Descriptions or explanations
- • Suggestions or ideas
- • Any long-form text response
Example configuration
{
"question_text": "Please describe your experience in detail",
"question_type": "textarea",
"is_required": false,
"min_length": 10,
"max_length": 1000
}Configuration options
- min_length - Minimum number of characters (optional)
- max_length - Maximum number of characters (optional)
- is_required - Whether the question must be answered
Tip: Use min_length to ensure respondents provide meaningful feedback (e.g., min_length: 20 to encourage detailed responses).
Email input with built-in validation to ensure proper email format.
Use cases
- • Contact information collection
- • Newsletter signups
- • Account registration
- • Follow-up communication
Example configuration
{
"question_text": "What is your email address?",
"question_type": "email",
"is_required": true
}Automatic validation: Ensures the response matches standard email format (e.g., user@example.com). Validation happens on the client and server side.
Phone
Phone number input optimized for mobile devices with numeric keyboard.
Use cases
- • Contact information
- • Support requests
- • Appointment scheduling
- • Verification or callbacks
Example configuration
{
"question_text": "What is your phone number?",
"question_type": "phone",
"is_required": false
}Note: Phone fields accept various formats. Consider providing format guidance in your question text (e.g., "Please include country code").
URL
URL input with validation to ensure proper web address format.
Use cases
- • Website or portfolio URLs
- • Social media profiles
- • Reference links
- • External resources
Example configuration
{
"question_text": "What is your website URL?",
"question_type": "url",
"is_required": false
}Automatic validation: Ensures the response is a valid URL (e.g., https://example.com). Accepts http://, https://, and other protocols.
Number
Numeric input that accepts only numbers, optimized with numeric keyboard on mobile.
Use cases
- • Age or years of experience
- • Quantities or counts
- • Budget or price ranges
- • Any numeric value
Example configuration
{
"question_text": "How many years of experience do you have?",
"question_type": "number",
"is_required": true
}Tip: For specific numeric ranges, consider using a rating scale instead for better user experience (e.g., age groups or satisfaction scores).
Date
Date picker input for selecting dates with a visual calendar interface.
Use cases
- • Birth dates or anniversaries
- • Event or appointment dates
- • Deadlines or target dates
- • Historical dates or timelines
Example configuration
{
"question_text": "What is your preferred start date?",
"question_type": "date",
"is_required": true
}User-friendly: Respondents can either type a date or use the calendar picker. The date format adjusts to the user's locale automatically.
Best practices
Choose the right input type
Use specific types (email, phone, URL) instead of generic text fields. This provides validation and optimizes the mobile keyboard for better user experience.
Set appropriate length limits
Use min_length and max_length to guide responses. For example, require at least 10 characters for meaningful feedback, or limit names to 100 characters.
Provide clear instructions
Use question_text to explain what format or level of detail you expect. For example, "Please include your country code" for phone numbers.
Consider making fields optional
Not all information needs to be required. Optional fields reduce friction and increase completion rates. Only mark fields as required when truly necessary.
Use textarea for detailed feedback
When you want detailed responses, use textarea instead of text. The larger input area encourages more thoughtful, complete answers.