Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

Bought Jack McDade's course on design. Going through it now...and it is SO well done!

— Justin Jackson, Transistor.fm

Form Fieldtype

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

Form Fieldtype UI
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.

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
  • api_url
  • honeypot

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

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. Make sure to specify the "handle" of the query scope, eg. my_awesome_scope.

HR: Section
Learn More!

Pick a form, any form.

Docs

HR: Section
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →