URL field
What it does
A URL field is a one-line box for a web address, such as the visitor's company website or a link to a photo album. 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.
Before the form is sent, the field checks that the text has the form of a full web address. On the submission page,
in the submission list and in notification emails, an address that starts with http:// or https:// shows as a
link your team can click. An ftp:// address and an export show it as text.
When to use
- Use URL when visitors should send a web address that your team can open straight from the submission.
- Use a Text field when the visitor may write a shop name or a social media handle instead of an address. 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, Validation and Appearance. You'll change these settings most often:
- Placeholder is a hint shown inside the empty box.
https://reminds visitors to start with it. - Default Value fills the box when the form opens. The visitor can change it.
- Required makes the visitor fill in the box before the form can be sent.
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 |
| Placeholder | General → Field Settings | Text | Yes |
| Default Value | 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 |
| Input Mask | General → Advanced | Text | No |
| Transform Text After Save | General → Advanced | No, Uppercase, Lowercase | No |
| Browser Autocomplete | General → Advanced | Text | No |
| Unique Value | Validation → Unique | On or off | No |
| Error Message | Validation → Unique | Text | Yes |
| Minimum Length | Validation → Length | Number | No |
| Error Message | Validation → Length | Text | Yes |
| Maximum Length | Validation → Length | Number | No |
| Error Message | Validation → Length | Text | Yes |
| Pattern | Validation → Pattern | Text | No |
| Error Message | Validation → Pattern | Text | Yes |
| 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 |
| 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
The field checks the address when the visitor clicks Submit:
| Check | What the visitor sees when it fails |
|---|---|
| Full address, always on | "Please enter a valid URL. Protocol is required (http://, https:// or ftp://)." under the box. |
What the address check accepts, the same on Luma, Hyvä and Breeze:
| The visitor types | Result |
|---|---|
https://lenaholm-interiors.example/projects | Accepted |
http://northstar.example/trade?ref=1 | Accepted |
ftp://files.northstar.example | Accepted |
https://northstar, an address without a domain ending | Accepted |
www.northstar.example or northstar.example, without https:// | Refused |
mailto:sales@northstar.example | Refused |
The check runs in the visitor's browser. The store doesn't check the address again when the form arrives, so a submission sent around the browser can hold any text. The Validation tab also has Minimum Length, Maximum Length and Pattern; see Validation rules.
Logic
- Show or hide this field: yes. A rule that starts from a field with options, such as a Select, can show or hide a URL field. See Show or hide fields and sections.
- Start a rule: no. Only fields with options can start a rule. A Logic tab appears on a URL field only once a rule shows or hides it, and lists that rule.
- Email conditions: yes, with Is, Is Not, Contains, Starts With and Ends With. For example,
Contains
instagram.commatches any address with that text in it.
Limits
- The check looks at the form of the address, not whether the website exists.
- Visitors often type
www.withouthttps://. The error message tells them what to add, but you may want to say it in Placeholder or Help Text too.
Troubleshooting
- A visitor says the form refuses their website. The address needs
https://orhttp://in front. Ask them to type it. A Placeholder ofhttps://reminds visitors, but they still have to type it. - A submission holds text that isn't an address. The check runs only in the browser. See Validation.
What's next
- Text field: a box without the address check.
- Validation rules: length and pattern checks in detail.
- Recipients and conditions: route notifications by text in the address, such as a domain.