Appearance
input
Renders an <input> element with automatic value re-population from submitted form data.
For file uploads, use the {% upload %} tag instead.
Usage
liquid
{% input type: 'text', name: 'first_name', class: 'form-control', required: 'required' %}Options
All standard HTML input attributes are supported, including data- attributes. Pass them as key/value pairs.
| Option | Description |
|---|---|
type | Input type — text, email, number, checkbox etc. For file input use the custom upload tag. |
name | Field name. Used to auto-populate the value from submitted form data. When used within a submission form, this must align with a corresponding field in a Syngency model record. |
id | ID attribute. |
class | CSS classes. |
value | Default value. Overridden automatically if a submitted value exists. |
placeholder | Placeholder text. |
required | Pass required: 'required' to mark the field as required. |
data-* | Any data- attributes are supported, e.g. data-foo: 'bar'. |
WARNING
Attributes without values are ignored. Use required: 'required' rather than required alone.
Auto-population
When a name is set, the field value is automatically re-populated from submitted form data after a failed submission. This applies to both contact forms (via querystring.form.values) and submission forms (via form.values).