Name field
What it does
A Name field asks for a person's name in separate boxes under one label. You find it in the builder's left panel, in the Text Input group, and add it by dragging it onto the form, as described in Adding fields and sections.
A new Name field has two boxes side by side, First name and Last name, each with its own small label, called a sub-label. You can add three more parts: a title, such as Mr. or Dr., chosen from a list, a middle name and a suffix, such as Jr. All the parts you switch on share one row: the title list is as wide as its longest option, and the name boxes share the rest equally.
The answer is saved as one name. The submission page, the Inbox column and emails show the parts joined in one line, for example "Ms. Hana Marie Novak Jr.".
When to use
- Use Name when you want first and last name separately, for example to address the customer by first name in a reply, or when a signed-in customer's name should fill in by itself.
- Use a Text field when one box for the whole name is enough. See Text 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 and Appearance. You'll change these settings most often:
- Name Fields (General tab) lists the five parts: Prefix, First name, Middle name, Last name and Suffix. Each part has a switch that shows or hides it, a Sublabel (the small label the visitor sees), a Placeholder (a hint inside the empty box) and its own Required switch. A new field shows First name and Last name, both marked Required.
- Prefix Options lists the titles the visitor can choose from, one per line. When it's empty, the list is Mr., Mrs., Ms., Dr. and Prof.
- Required (General tab, under Basic) makes the visitor fill in every part that is marked Required. When the field itself isn't required, the visitor can leave the whole name empty. But once they fill in any part, the parts marked Required must be filled in too. The builder says so under each part's Required switch while the field isn't required: "Required once any part is filled in".
- Pre-fill with Customer Data fills the empty First name and Last name boxes with the name of the signed-in customer's account. The customer can still change them. A Name field you add in the builder starts with it on. Fields that already exist, and fields that come from an imported file or through the API, keep the value they have.
- Sublabel Position (Appearance tab) puts the sub-labels below the boxes or above them. A new field places them below; a field that came over from an earlier version keeps them above.
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 |
| Pre-fill with Customer Data | General → Field Settings | On or off | No |
| Name Fields | General → Field Settings | Edited in the panel | No |
| Prefix Options | 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 |
| Sublabel Position | Appearance → Style | Above input, Below input | 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 |
Validation
Which parts must be filled in depends on the field's own Required setting:
- The field is Required: each part marked Required must be filled in before the form is sent.
- The field isn't required: the visitor can send the form with the name left empty. If they fill in any part, for example only First name, each part marked Required must be filled in as well.
Only what the visitor types or picks counts as filled in: a title that is already selected in Prefix doesn't. A name filled in by Pre-fill with Customer Data does count.
The visitor sees one message under the field for each empty part, with that part's sub-label, for example "First name is required" and "Last name is required". The same messages show on Luma, Hyvä and Breeze. Required Error Message doesn't change these messages.
The field has no Validation tab: length and pattern checks aren't available for a name.
Logic
- Start a rule: no. A Name field can't start one. Its Logic tab appears only once a rule shows or hides it, and lists that rule.
- Show or hide this field: yes. Start the rule on another field that has a Logic tab, such as a Select, and choose this field as the one to show or hide. See Show or hide fields and sections.
- Email conditions: the field is listed with Is, Is Not, Contains, Starts With and Ends With.
They compare against the full name as the submission page shows it, such as
Sofia Rossi, and ignore letter case. Contains with one part of the name, such as a last name, matches too. See Recipients and conditions.
Limits
- By default, a name counts as personal data. Through the Management API and AI assistants the answer is masked. The
masked stand-in for a Name answer reads
{.instead of a short hint of the name. See Personal data masking. - Pre-fill with Customer Data uses only the first and last name of the account. Title, middle name and suffix stay empty.
Troubleshooting
- The visitor sees "Last name is required" but wants to give one name only. This happens even when the field isn't required, as soon as the visitor fills in another part. Turn off Required for the Last name part in Name Fields, or hide that part, and publish the form.
- A signed-in customer's name doesn't fill in. Check that Pre-fill with Customer Data is on, and that the boxes were empty: the field fills only empty boxes.
What's next
- Address field: ask for a postal address in parts.
- Email field: ask for an address to reply to.
- Appearance settings: width and sub-label position.