Skip to main content

HTML field

What it does​

An HTML element puts your own HTML on the form, for example an image, a small table or a video from your own store. Your store shows it exactly as you write it: nothing is removed, and scripts in it run. It collects no answer.

You find HTML in the builder's left panel, in the Content group, and add it by dragging it onto the form, as described in Adding fields and sections.

When to use​

  • Use HTML when Rich Text isn't enough, for example for an image or a table.
  • For plain text, links and lists, use Rich Text instead: it removes anything unsafe for you.

Settings​

Go to Content → WebForms → Manage Forms, click the form's name, then click Form Builder. Click the element on the form. Its settings show in the right panel, on the tabs General and Appearance:

  • HTML Content is the HTML.
  • Label (admin only) names the element in the builder and on the submission page. Visitors don't see it.

The table below lists every setting. Visitors get 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 Element General → Basic On or off No
Label (required) General → Basic Text Yes
HTML Content General → Element Settings Text 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
Container Classes Appearance → CSS Text No

What you should see​

  • On your store: the HTML as written. Styles in a <style> block apply, scripts run, and attributes such as onclick work, on Luma, Hyvä and Breeze.
  • On the submission page and in the staff PDF: the element appears under Details with its label and its content, although the visitor typed nothing into it.
  • In notification emails: it isn't part of the answers that {{var all_fields}} lists.

Validation​

The element has no checks.

Logic​

  • Show or hide this element: yes, with a rule on the logic board. Once a rule controls it, the element's panel gets a Logic tab that lists the rule. See Show or hide fields.
  • Start a rule: no.

Limits​

  • Anything you paste here runs. A script in an HTML element runs in every visitor's browser and also in the admin, for anyone who opens a submission of this form. Paste only code you trust, and give Edit Form permission only to people you trust with your storefront's code. See Safe HTML.
  • In a popup or a slide-out, a script in an HTML element also runs, with the attributes you wrote except event attributes such as onload, once per page and before the form starts. It doesn't run again when the popup is reopened, nor when the page has already run the same script of the same element. If the script hasn't loaded within 5 seconds, the form starts without it and the script runs when it arrives. Scripts that rely on the page's own address work differently in a popup; see Frontend APIs. Anyone who opens the form can read the script's code, so keep secrets out of it.
  • HTML Content isn't translated per store view.

Troubleshooting​

  • The element shows on the submission page, but the visitor didn't fill it in. That is how the element works: its content is shown with the answers. It isn't in the emails.

What's next​

Applies to WebForms 4Last reviewed November 24, 2026