Skip to content Skip to footer navigation
🏰 Statamic Summit 2027 Feb 16–19 Talks, workshops, and three nights in a German castle. Get Tickets

Form Fieldtype

Use this fieldtype to create a relationship with one of your site's forms.

Screenshot of Form Screenshot of Form
The Form Fieldtype in action!

Overview#

The Form fieldtype is gives your users a way to pick a form to include along with the current entry. How that form is implemented or shows up on the page is up to you.

Not to be confused with form fieldtypes β€” the fields you add inside a form when building it. This fieldtype is for selecting an entire form from elsewhere, like an entry.

Data Storage#

The Form fieldtype stores the handle of a single form as a string, or an array of handles if max_items is greater than 1.

Templating#

The Form fieldtype provides a few useful variables:

  • handle
  • title
  • fields
  • sections
  • pages
  • status
  • require_login
  • closed_message
  • require_login_message
  • api_url
  • honeypot

You can pass the handle to the {{ form:create }} tag to render a <form> on your page:

{{ form:create :in="form_fieldtype:handle" }}
...
{{ /form:create }}
<s:form:create :in="$form_fieldtype->handle">
...
</s:form:create>

Options

max_items

integer

The maximum number of forms that may be selected.

placeholder

string

Set the non-selectable placeholder text. Default: none.

query_scopes

string

Allows you to specify a query scope which should be applied when retrieving selectable forms. You should specify the query scope's handle, which is usually the name of the class in snake case. For example: MyAwesomeScope would be my_awesome_scope.