Page
A Page object represents one page in a form. Single-page forms still have a page object; multi-page forms just make the page sequence more visible.
For a saved form with the handle contactForm, retrieve its pages and inspect their labels in Twig:
{% set form = craft.formie.forms({ handle: 'contactForm' }).one() %}
{% if form %}
{% for page in form.getPages() %}
<h2>{{ page.label }}</h2>
{% endfor %}
{% endif %}Each loop item is a Page. Use its methods below when you need the fields or conditions belonging to that page.
Properties
Type: string|null
The page label.
Type: string|null
The page handle, derived from the label.
Type: int|null
The page order within the form.
Type: array
The page settings, including page button labels and layout options.
Methods
Returns: array
Returns the row objects on this page.
Returns: array
Returns the Field objects on this page.
Returns: FieldInterface|null
Pass the required field handle, for example page.getFieldByHandle('email'). Returns a field on this page or null when it is absent.
Returns: bool
Pass the submission being evaluated, for example page.isConditionallyHidden(submission). Returns whether the page is hidden for that submission because of conditions.
Returns: bool
Returns whether the page has conditions configured.
Returns: array
Returns the page conditions.
Returns: array
Returns the conditions in the shape used by Formie’s front-end handling.
Returns: array
Pass the submission being checked, for example page.getFieldErrors(submission). Returns its field errors for this page; the argument may be null.