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
ThetelInput method creates a telephone input field with automatic country code selection and formatting. It supports international phone numbers with country-specific placeholders and validation.
Method Signature
Parameters
The unique identifier for this input field. Used to reference the phone number in form submissions.
Required Parameters
The main question or label displayed to the user.
Input-Specific Parameters
Sets custom placeholder text. If not provided, a country-specific placeholder is automatically generated.
Default country code (2-letter ISO code). Defaults to See Country Codes for the full list of supported countries.
"US" if not specified.Array of country codes to allow. If provided, only these countries will be available in the country selector.
Maximum number of allowed characters in the phone number input.
Custom regex pattern for phone number validation.
Default phone number value.
Shared Parameters
All standard form field parameters are supported. See textInput for the complete list includingrequired, description, fieldSize, disabled, and more.
Examples
Features
- Country Selector
- Smart Placeholders
- Calling Codes
The telephone input automatically includes a country selector showing:Users can click the country selector to choose a different country from the available options.
- Country flag
- Country calling code (e.g., +1, +44)
- Country name
Country Codes
Common Countries
Common Countries
Most frequently used country codes:
| Code | Country | Calling Code |
|---|---|---|
US | United States | +1 |
CA | Canada | +1 |
GB | United Kingdom | +44 |
AU | Australia | +61 |
DE | Germany | +49 |
FR | France | +33 |
IT | Italy | +39 |
ES | Spain | +34 |
NL | Netherlands | +31 |
CN | China | +86 |
JP | Japan | +81 |
IN | India | +91 |
All Supported Countries
All Supported Countries
The
telInput method supports over 200 countries and territories. Some examples:- North America:
US,CA,MX - Europe:
GB,DE,FR,IT,ES,NL,SE,NO,DK,FI - Asia:
CN,JP,IN,KR,SG,TH,VN - Oceania:
AU,NZ - South America:
BR,AR,CL,CO - Africa:
ZA,EG,NG,KE
Regional Groups
Regional Groups
Common regional groupings:
Use Cases
Contact Forms
Collect phone numbers from customers for follow-up.
User Registration
Get phone numbers for account verification via SMS.
Delivery Information
Collect phone numbers for delivery coordination.
International Support
Support customers from multiple countries.
Best Practices
Set appropriate default country
Set appropriate default country
Choose the most relevant default country for your audience:
Limit available countries
Limit available countries
If you only operate in specific regions, limit the country list:
Clear formatting expectations
Clear formatting expectations
Use descriptions to clarify expectations:
Consider validation needs
Consider validation needs
Add pattern validation for strict requirements:
Validation
Phone number validation varies by country. The input uses the HTML5
tel type with optional pattern validation.Return Value
Returns a string containing the Forms.md markup for the telephone input field. Submitted value format: The calling code and phone number, e.g.,"+1 555-123-4567"
Related Methods
textInput
General text input for non-phone text
emailInput
Email input with validation
numberInput
Numeric input for phone extensions