Basin Form field
The Basin Form field lets editors pick one of the forms in your linked Basin project, for example a contact form for each landing page.
Settings
Section titled “Settings”| Setting | What it does |
|---|---|
| Selectable forms | All forms, or Only forms with a Form Studio embed. Choose the second if your template shows the field with craft.basin.render(), so editors can’t pick a form it can’t show. |
| Limit to these forms | Only allow particular forms. Leave all unchecked to allow every form chosen above. |
In templates
Section titled “In templates”The field’s value is the form (the same object craft.basin.form() returns), or null if none is chosen or the form is no longer in your project:
{% set form = entry.contactForm %}{% if form %} <form action="{{ form.action }}" method="post"> … </form>{% endif %}To show the form’s Form Studio version, there’s no need for {% if %}:
{{ craft.basin.render(entry.contactForm) }}See Form Studio forms.
When a form disappears
Section titled “When a form disappears”The field stores the form’s Basin ID. If the form is later deleted in Basin or moved to another project:
- the field shows editors a warning, Form unavailable, with the ID;
- it keeps the ID until an editor chooses another form or None, so nothing is lost if the form comes back;
- in templates, the value is
null; - it’s recorded in the error log. See Missing or moved forms.
While Basin can’t be reached, entries can still be saved, and the field keeps its value.
GraphQL
Section titled “GraphQL”The field returns a BasinForm. See GraphQL.