Free text entry of a phone number.
A “telephone” keypad is displayed on focus on mobile devices. A tick is displayed in the right margin as soon as the number entered is valid.
Format
| Format | Result |
|---|---|
| Auto (default) | Any entry containing at least 5 digits is accepted and stored exactly as typed |
| International | The number must be a valid phone number of any kind, e.g. landline, mobile or toll free |
| International Mobile | The number must be a valid mobile number |
International and International Mobile validate against the numbering rules of the country the number belongs to and store the number in international format, see below.
Default Country Code
Required for the International and International Mobile formats. Enter an ISO 3166 two letter country code, e.g. NZ for New Zealand or AU for Australia. For other countries refer to the Alpha-2 codes on the ISO website.
The default country is assumed when a number is entered without an international dialling prefix, e.g. 0223709899. A number entered with a + prefix is validated against the country it belongs to, so a form with a default country of NZ still accepts +61 412 345 678.
The default country can also be a <<tag>> referencing another question, e.g. a Country dropdown whose option values are country codes, so that validation follows the country selected by the form filler. If the referenced question is blank the phone number is accepted without validation or formatting.
Maximum Length
Limits the number of characters that can be entered, including spaces and punctuation.
Autocomplete
See Autocomplete.
Formatting
When a valid number is entered for the International or International Mobile formats it is converted to international format when the form filler leaves the question, e.g. with a Default Country Code of NZ:
| Entry | Stored Value |
|---|---|
| 0223709899 | +64 22 370 9899 |
| 04 462 6000 | +64 4 462 6000 |
| 0800 123 456 | +64 800 123 456 |
| +61 412 345 678 | +61 412 345 678 |
Numbers loaded from a saved form or prefilled from a link or the API are formatted in the same way when the form opens. The formatted value is what appears in documents, emails and integrations, e.g. <<Mobile>> gives +64 22 370 9899.
Numbers entered with the Auto format are stored exactly as typed.
Validation Errors
The following error conditions are evaluated when the user attempts to move to the next section, or submit.
| Format | Condition | Error Message |
|---|---|---|
| Any | No value provided and question is Required | Required |
| Auto | Fewer than 5 digits | Phone number must contain at least 5 digits |
| International | Not a valid number for the country | Not a valid phone number, please check | Ignore |
| International Mobile | Not a valid mobile number for the country | Not a valid mobile number |
The International format offers an Ignore link because phone numbering rules change and a legitimate number is occasionally rejected. Selecting Ignore accepts the number as entered and lets the form filler continue. International Mobile does not offer Ignore, so use it only where a mobile number is essential, e.g. for sending a text message.