Skip to content

Check if form was submitted by user/visitor #474

Discussion options

You must be logged in to vote

This is now added in Freeform 4.0.9. 🙂

Freeform includes validation to prevent duplicate submissions (when the user tries to submit the form again), but if you wish to prevent users from even being able to see the form (and display an error/notice in its place), you can use submissionLimitReached (form object) as a conditional. It's a bool variable, which will be true if the form has the Limit Form Submission Rate setting enabled and the user has already submitted the form.

{# Replace 'myForm' with your form handle. #}
{% set form = craft.freeform.form("myForm") %}

{# Check if user has already submitted the form #}
{% if form.submissionLimitReached %}

    {# Hide form and display error …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jakobploens
Comment options

Answer selected by kjmartens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants