Contact Forms
A <form> with data-joomni-action="lead-submit" sends its fields to the store’s Leads inbox. The storefront adds the spam protection, publishes the request state back onto the form for your CSS, and drops any field not on the allow-list.
A form, live
Edit the markup or the CSS. To see each state the shopper will see, change data-joomni-state="idle" on the form to sending, error, invalid or sent.
Runs in your browser on sample data: the same engine and filters as the storefront. Widgets such as add to cart are simulated: clicking one shows what would happen on a store.
Fields
| Field name | Required |
|---|---|
| firstName | yes |
| yes | |
| message | yes |
| lastName | no |
| phone | no |
| subject | no |
| custom_* | no |
custom_* inputs (like custom_budget) are saved in the lead's details. An optional data-joomni-variant on the form is stored as design_variant, for telling two form designs apart. The source is always recorded as the Liquid contact form; markup cannot relabel it.
States
The storefront sets data-joomni-state on the form as the request moves along. Style each one with an attribute selector.
| data-joomni-state | When |
|---|---|
| idle | Before the visitor submits |
| invalid | firstName, email or message was empty |
| sending | The request is in flight. A second submit is ignored |
| sent | Saved. The form is reset |
| error | The request failed; the visitor can retry |
Keep a real action
action="/contact" and method="post". Before the page has loaded its scripts, or with scripts off, the browser submits to the built-in contact page instead of doing nothing.Leads land under Sales & Marketing › Leads in the merchant's dashboard. See Leads.