Contact field
What it does
A Contact field is a dropdown of people or teams, such as your showrooms. Each option has a name the visitor sees and an email address the visitor doesn't see. A notification can then go to the address of the option the visitor picked. You find the field in the builder's left panel, in the Store Data group, and add it by dragging it onto the form, as described in Adding fields and sections.
On the storefront the dropdown starts empty and lists the option names only. The addresses aren't in the page the visitor's browser receives.
When to use
- Use Contact when the visitor's choice decides who gets the email: a store, a department, a person.
- When the choice doesn't change the recipient, use a Select field.
Settings
Go to Content → WebForms → Manage Forms, click the form's name, then click Form Builder. Click the field on the form. Its settings show in the right panel, on the tabs General, Appearance and Logic. You'll change these settings most often:
- Label (General tab) is the question above the dropdown, for example "Which showroom should contact you?".
- Options lists the entries. Click Edit Options. Each option has a Name, which the visitor sees, and a Recipient Email. To send to several people, enter their addresses in Recipient Email separated by commas. An option with no address sends no email. See Options.
- Required makes the visitor pick an option before sending. Without a picked option, no one gets the email meant for the chosen contact.
To send the email to the chosen option, add a notification with Recipient Source set to The Contact the Visitor Chose. See Recipients and conditions.
The table below lists every setting. Visitors see a change after you click Publish Changes in the builder's top bar.
All settings of this field
| Setting | Where in the panel | Values | Translatable |
|---|---|---|---|
| Enable Field | General → Basic | On or off | No |
| Label (required) | General → Basic | Text | Yes |
| Field Code | General → Basic | Text | No |
| Required | General → Basic | On or off | No |
| Required Error Message | General → Basic | Text | Yes |
| Help Text | General → Basic | Formatted text | Yes |
| Tooltip | General → Basic | Formatted text | Yes |
| Options | General → Field Settings | Edited in the panel | No |
| Empty Option Text | General → Field Settings | Text | Yes |
| Hide in Submissions | General → Submission Display | On or off | No |
| Allow in Staff Email Subject | General → Submission Display | On or off | No |
| Submission Label | General → Submission Display | Text | Yes |
| Personal Data | General → Privacy | By field type — Personal data, Not personal, Personal data | No |
| Desktop | Appearance → Layout | Width: Full (1/1), Half (1/2), Third (1/3), Quarter (1/4), Fifth (1/5), Sixth (1/6), 2/3, 3/4, 2/5, 3/5, 4/5, 5/6; New row: on or off | No |
| Tablet | Appearance → Layout | Width: Full (1/1), Half (1/2), Third (1/3), Quarter (1/4), Fifth (1/5), Sixth (1/6), 2/3, 3/4, 2/5, 3/5, 4/5, 5/6; New row: on or off | No |
| Mobile | Appearance → Layout | Width: Full (1/1), Half (1/2), Third (1/3), Quarter (1/4), Fifth (1/5), Sixth (1/6), 2/3, 3/4, 2/5, 3/5, 4/5, 5/6; New row: on or off | No |
| Show Label | Appearance → Style | On or off | No |
| Help Text Position | Appearance → Style | Below input, Above input | No |
| Show Selected Values | Appearance → Style | On or off | No |
| Container Classes | Appearance → CSS | Text | No |
| Input Classes | Appearance → CSS | Text | No |
| Custom Attributes | Appearance → Advanced | Text | No |
| Inline Style | Appearance → Advanced | Text | No |
What gets saved
| Where | What it shows |
|---|---|
| The visitor's form | The option names |
| Email to the chosen option | Sent to every address of that option. Each address gets its own email, so the people behind an option don't see each other's addresses |
| The submission page in the admin, emails with all answers, the PDF | The option name |
| The customer's own submission page in My Account | The option name |
| The Management API | A masked value: the field counts as personal data. See Personal data masking |
Validation
| Check | What the visitor sees when it fails |
|---|---|
| Required, no option picked | "Please select an option." under the dropdown, or your Required Error Message. |
Logic
- Start a rule: yes. A Contact field can show or hide other fields and sections, for example a question only one team needs. Open the field's Logic tab and click Manage conditional logic. See Show or hide fields and sections. On the canvas, a field the rule shows reads "Shown when" with this field's label and the option's name, without its address.
- Email conditions: yes. A notification can go out only when the answer Is or Is Not an option you choose. The list there shows each option with its address.
Limits
- In the notification list, the recipient shows the field by its code, not by its label. See Field codes.
- Option names are shown on your store exactly as you type them, including any HTML. Only people you trust with your storefront's code should edit this form. See Safe HTML.
Troubleshooting
- The chosen team gets no email. Check that the option has a Recipient Email, and that a switched-on notification uses The Contact the Visitor Chose with this field.
- The email goes to the wrong team. Open Edit Options and check the Recipient Email of the option the visitor picked.
- The same person gets the email twice. Each switched-on notification sends its own email, even when two of them reach the same address. A common case: one notification goes to your team by fixed address, and the notification for The Contact the Visitor Chose has the same address in Office Copy or as an option's address. Keep one of the two, or set Office Copy to None.
What's next
- Recipients and conditions: send the email to the chosen contact.
- Select field: a dropdown without recipients.