How to schedule or close the availability of your form
Do you have a certain start and end date to collect responses, or collected enough submissions? Then you can schedule or close the availability of your form.
When to use
In some situations you want to prevent respondents to fill out your form. A few of those situations are:
- Your form may only be entered after a certain date (start date);
- Your form may only be entered before a certain date (closing date);
- Your form may only be entered in between a certain date range (start and closing date);
- You have collected sufficient results and your form has to be closed.
How to use
To prevent a form from being able to submit, we have two question types available:
- Force stop block - Stops the form and optionally shows an explanation text;
- Raise error block - Stops the form and optionally shows an error text.
By adding one of these blocks to your form, the form will not be able to continue and thus preventing form submissions. You can use that behavior to schedule or close your form.
Close availability
The easiest use case is simply closing your form. To do so, you just add a force stop block or a raise error block at the start of your form. This will immediately stop your form and you can show a message to your visitors why the form is closed.
Schedule availability
If your form is only available from a certain date or for a certain date range, you can use some smart logic to achieve that. To do so, we need a few steps:
- Get respondent's timestamp - To be able to verify your schedule we first need to let our form know the current date and time of a respondent. To do so, we add a hidden field block to gather the current timestamp, by setting it up like this:
- Name:
Respondent's timestamp
(or any other name you'd like); - Type:
Timestamp
.
- Name:
- Set form availability - Now create a logic branch and add the branch conditions to match when the form is NOT available. To do so you can compare the timestamp in your hidden field with your desired conditions, for example:
Respondent's timestamp
is beforeyour start date
;Respondent's timestamp
is afteryour closing date
;Respondent's timestamp
is beforeyour start date
orRespondent's timestamp
is afteryour closing date
.
- Stop the form - Lastly add a force stop block or a raise error block inside the branch, so that will be executed when the branch is entered and your form stops. If the branch does not get entered (so your form is active), the form will just continue with your first question.