Phone input
Use phone_input to collect a respondent’s phone number. You can optionally show a country selector and collect an extension.
See shared field properties for properties accepted by every field type.
Configuration
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
placeholder | string | No | None | Grey hint text inside the empty input. Supports {{field}} piping. |
defaultValue | string | No | None | Prefills the input. May contain a {{hidden_name}} reference. |
enableCountryCode | boolean | No | false | Shows a country selector and stores the dial code with the number. |
defaultCountryCode | string | No | US when enableCountryCode is true; otherwise not used | Two-letter country code, such as US, GB, or DE. Sets the country selected initially. |
collectInternationalExtension | boolean | No | false | Adds an extension input next to the number. Used only when enableCountryCode is true. |
Validation
When the field is required, an empty answer blocks the respondent from continuing. A dial code by itself counts as empty. If the number has fewer than 4 or more than 15 digits, a message appears under the field.
Submission value
The answer is a string containing the dial code and number, such as +442079460123. When an extension is collected, it is appended as ext <n>, such as +442079460123 ext 45.
Example
{
"type": "phone_input",
"name": "mobile",
"label": "Mobile number",
"placeholder": "Enter your number",
"defaultValue": "",
"enableCountryCode": true,
"defaultCountryCode": "GB",
"collectInternationalExtension": true,
"required": true
}