Repository navigation
Close a form on a date
github-actions[bot] edited this page Oct 30, 2026
·
2 revisions
Written against v0.1.0.
A form should accept submissions only between two dates, and the page should show a message outside that window instead of the form.
- Open the form's settings screen and go to Restrictions.
- Switch on Schedule the Form, then set Start Date and Time and End Date and Time under Form Schedule.
- Write Message to Display When the Form is Pending (shown before the start) and Message to Display When the Form Has Expired (shown after the end). Save the form.
- In the form's template, wrap the form in the
form_restrictiontag:
{{ form_restriction handle="contact" }}
{{ if open }}
{{ form:contact }} ... {{ /form:contact }}
{{ else }}
<p>{{ message }}</p>
{{ /if }}
{{ /form_restriction }}Before the start the tag reports pending, after the end expired, and inside the window open. A submission outside the window is refused whether or not the template uses the tag. A start or end date that cannot be read as a date closes the form with the state schedule_unreadable.
-
Restriction states: the values
open,stateandmessagetake. -
Configuration: the
restrictionsswitch that turns this behavior on and off.
Home | Getting started | Guides | Troubleshooting | Reference | README | Repository
Written against v0.1.0. Edit these pages in docs/wiki/ through a pull request; edits made in the wiki are overwritten by the next publish.
Getting started
Guides
Troubleshooting
Reference
Project