Input
The Input component is a field the visitor types into: an email address, a first name, a phone number, a birthday or a comment. When the visitor presses a button set to Submit and Continue, the answer is collected and sent to your integration. There the field appears under its Name.
The short code at the top of the settings panel, next to the copy icon, is the component’s id. You only need it in a button’s custom script, where {{id}} stands for the visitor’s answer (see Button).
Settings
Section titled “Settings”The settings below sit in the Input section of the panel. The Validation section only appears when Input Type is Date.
The name of the component in the builder’s component list. It is only for you and is never shown to the visitor or sent with the answer.
Input Mode
Section titled “Input Mode”- Single Line: a normal one line field.
- Multi-Line: a larger text box for longer answers, such as a comment. A multi-line field is always plain text, so Input Type is hidden, and a Height setting appears under Dimensions.
Autofill
Section titled “Autofill”Tells the visitor’s browser which saved details it may suggest: Off, Full Name, First Name, Last Name, Email Address, Phone Number or Website URL. It is Off by default. Turn it on for an email or name field so visitors type less.
Input Type
Section titled “Input Type”What kind of answer the field expects. It also decides which keyboard a phone shows.
- Text: any text.
- Password: the typed characters are hidden on screen.
- Email Address: checked to look like an email address (see below).
- Number: the browser only accepts a number, and phones show a number keyboard.
- Phone Number: phones show a phone keypad. The format is not checked.
- URL: a web address.
- Date: phones show a number keyboard, and the Validation section appears.
The wording in the field, such as “Your email address”. It can be translated per language (see Campaign Localization). How it is shown depends on Label Style.
Label Style
Section titled “Label Style”- None: the Text is a placeholder inside the field and disappears as soon as the visitor starts typing.
- Tag: the Text starts inside the field and, when the visitor clicks in or types, moves up onto the top border as a small tag, so the visitor can still see what the field is for.
- Inside: the Text starts inside the field and, when the visitor clicks in or types, shrinks to a small label at the top inside the field, above the answer.
Required and Validation Message
Section titled “Required and Validation Message”Tick Required to stop the visitor from submitting the step while this field is empty.
Validation Message is the text shown when the field blocks the submit. It is shown:
- for an empty required field,
- for a required number or URL that is not valid,
- for an email address or a date that is not valid, even when the field is not required.
Leave it empty and the visitor sees an example instead: name@example.com for an email field, or the date format (for example DD.MM.YYYY) for a date field. Text, number, phone and URL fields have no example to fall back on, so always write a Validation Message when one of them is required. The message can be translated per language.
Validation (date fields only)
Section titled “Validation (date fields only)”- Input Format: the order and separators the visitor types the date in, built from
DD,MMandYYYY, for exampleDD.MM.YYYY,MM.DD.YYYYorMM-DD-YYYY. A new field starts withDD.MM.YYYY. Write the letters in capitals. - Different Format in Submissions: tick this to send the date in a different format from the one the visitor typed.
- Output Format: the format the date is sent in when the box above is ticked, built from the same letters, for example
YYYY-MM-DD. - Earliest Date and Latest Date: the earliest and latest date the field accepts. A new field starts with 1 January 1930 and 1 January 2000. If you clear them, the field accepts any date from 1 January 1900 to 1 January 2100.
The remaining sections (Dimensions, Background, Border and Typography) control how the field looks.
How it behaves on the website
Section titled “How it behaves on the website”When validation runs. Nothing is checked while the visitor fills in the step for the first time. The fields are checked when the visitor presses a button set to Submit and Continue. If any field fails, the step does not move on. After that first try, typing never adds an error. An error clears as soon as the answer becomes valid, and the field is checked again when the visitor leaves it.
What the visitor sees. Every failing field gets a red outline. The first failing field is focused, and its Validation Message appears in a small dark bubble above it. The bubble of any other failing field appears when the visitor clicks into it.
What is checked, per type.
| Input Type | Checked when | Passes when |
|---|---|---|
| Text, Password | Required | Something is typed |
| Email Address | Always, once something is typed, and when empty if required | It has a name, an @ and a domain with a dot, such as name@shop.com |
| Number | Required | A number is typed |
| Phone Number | Required | Something is typed (any format) |
| URL | Required | The browser accepts it as a web address |
| Date | Always, once something is typed, and when empty if required | It is a complete, real date between Earliest Date and Latest Date |
Typing a date. The visitor only types digits; the separators from Input Format are added automatically. Keystrokes that cannot lead to a valid date are ignored, for example a 13th month, a 32nd day, a year outside the Earliest Date to Latest Date range, or the last digit of a date that does not exist (such as 31 November). A date that is only half typed fails on submit.
What is sent.
- Text, password, number, phone and URL fields send exactly what the visitor typed.
- An email address is checked more strictly than a browser checks it, against the internet mail standards (RFC 5322 for the address, RFC 5321 for its length and RFC 1035 for the domain). For example,
name..x@example.compasses the browser and fails here. - A date is sent in the Output Format when Different Format in Submissions is ticked, otherwise in the Input Format. Day and month are always two digits, so
1.5.1990typed underDD.MM.YYYYwith an Output Format ofYYYY-MM-DDis sent as1990-05-01. - An optional field left empty is sent as an empty answer, and integrations skip empty answers, so nothing is written to the contact for it. An optional date that is only half typed is sent as empty too.
Answers from every submitted step of the campaign are collected and sent together. Where they go from there is set up in Campaign Integrations, where each component is listed by its Name and type. Values from the DataHub can be sent alongside them through the integration settings.
Good to know
Section titled “Good to know”- Only components with an Integration Field are sent. Leave a component unmapped and its answer stays out of the integration, whichever integration it is. This is how you collect something for the campaign’s own use, such as a consent tick that drives a later step, without it reaching your CRM.
- An integration mapping follows the component, not its Name, so renaming the component keeps the mapping. Deleting and recreating the component loses it.
- A password field is sent to your integration like any other answer, as plain text. Avoid asking for real passwords.
- Phone numbers are never format checked. If your integration expects a specific format, say so in the Text.
- Number, phone and URL fields that are not required are not checked at all. Whatever is typed is sent.
- Clearing Earliest Date and Latest Date does not mean “no limit”: the field still accepts only 1900 to 2100.
- Always include
DD,MMandYYYYin Input Format.
Mobile
Section titled “Mobile”On the mobile tab, tick Override Desktop Properties to change the field for mobile visitors (see Campaign Device Customization).
- Can be set per device: Text, and the look of the field (Dimensions, Background, Border and Typography).
- Shared by every device, set on desktop: Input Mode, Autofill, Input Type, Label Style, Required, Validation Message and everything in Validation (Input Format, Output Format, Earliest Date and Latest Date). These are hidden on the mobile tab.
To place the field in a step and arrange it next to other components, see Campaign Step. To add the button that submits it, see Button.