metaobject-creator
Creates a metaobject from a Webflow form: every filled field whose name does not start with _; a name the form repeats (a checkbox group with each checkbox's value, a multiple select) sends all its values; a lone checkbox sends true / false. The backend converts each value to its field type: rating from a number (the field's scale), list.* from repeated values, a comma separated text or a JSON array, boolean, number_decimal with a comma, url without https://, references from a numeric id, rich_text_field from lines (one paragraph each), money in the shop currency, date_time from datetime-local, dimension / volume / weight from "2.5 cm" (a select data-unit-for="<name>" gives the unit of that field, its own name is not sent); a value already in Shopify's format passes as it is. A definition without the publishable capability gets no status (data-draft is ignored there). The backend refuses Shopify's standard types (shopify--…), the app-reserved ones ($app:…) and Smootify's own (magic_box, combinations, dynamic_property, option), with the form error "This form cannot create entries of this metaobject type". customer-field="<key>": the entry belongs to the logged-in customer, written by the backend into that field (a customer reference) from the Customer Account token, never from the form; logged out the element is hidden and its form inert (is-customer while logged in), and a request without a valid token is refused ("Log in to send this form"). 2.0: with customer-field the backend also puts the entry, first, into the customer's metafield smootify.<type> (a list of references to that type, created the first time, at most 128: the oldest leave the list), which smootify-metaobjects[data-type="metafield.smootify.<type>"][data-parent-id="customer"] lists on the account pages. Once the entry is created: data-handle and is-created on the host, every a[data-handle-param="<param>"] inside (in the form's success state) links its page with ?<param>=<handle>, the page whose smootify-metaobject[data-handle-param] shows the entry (a gift list), and button[data-action="share"] shares that link: the device's share sheet where there is one, else it is copied (data-copy always copies, data-title titles the share), is-shared / is-copied on the button for two seconds. 2.0: input[type=number][data-quantity-for="<list key>"] beside each checkbox of that list (in the same product card) sends, under its own name, one JSON field {"<product id>": n} with the count of every checked product (at least 1; an unchecked one is left out), such as how many units a gift list asks for.
At a glance
1 Settings › Custom data › Metaobjects › Warranty registration
warranty_registrationserial_numberSingle line textaccepts_remindersTrue or falsereceiptFile2 In Webflow, the form's fields: each Name is a key
truewhen checked, false when notEmpty fields are not sent, and neither are Names that start with _: use them for fields that only help the visitor, such as “repeat your email”.
3 Content › Metaobjects › Warranty registration
With data-draft="true" on metaobject-creator, the entry stays a draft until you make it active.
More in the guide.
Where it can go
- Anywhere on the page.
- Must contain
form. - Out of place, Smootify removes it from the page.
What it requires
- The server plan: on other plans Smootify removes the element from the page.
- The Metaobject creator extension (server plan, the extension activated in the Smootify dashboard, the licensed domain). Without it, its markup is removed from the page.
Fields in the form
Each field’s Name setting in Webflow tells Smootify what the field holds. It is a setting of the field, not a custom attribute.
| Name | Field | What it does |
|---|---|---|
| any name: the field key | any field | The metaobject field whose key is the snake_case of data-name (“Serial number” → serial_number, as customer-metafields-editor), else the name; names starting with _ and empty values are not sent; a repeated name sends a list, a lone checkbox true / false, a [data-unit-for] field adds its unit to that field and is not sent itself, a file-input[data-multiple] a list of file gids; 2.0: the data-quantity-for="<list key>" number inputs of one name send one JSON field {"<product id>": n} for the checked products of that list. |
Attributes on the element
- It reads
data-type,data-draft,customer-field,data-copy. - It reads
data-unit-foron . - It reads
data-quantity-foron . - It reads
data-handle-paramon . - It reads
data-titleon . - Smootify writes
is-customer,data-handle,is-createdon it: do not set them yourself.
Attributes inside it
| Group | Attribute name | Values |
|---|---|---|
| Metaobject form buttons | data-action | 2 |