Is there a way to disable a freeform form if a user has already submitted their details? There is a plugin that can pull the users IP but how do I compare to that to the list of IP addresses of submitted freeform entries?

{if "{exp:get_post_var type='user_ip'}" == ""}
    YES, it is
    NO, it is not

2 Answers 2


Freeform has built in duplicate detection. https://solspace.com/legacy_docs/freeform-4/form/#prevent_duplicate_on


You could check if an entry with a certain ip address is submitted with the entries function:

{exp:freeform:entries search:ip_address="" form_id="your-form-id" dynamic="off" limit='1'}
{if freeform:no_results}
No, has not submitted an entry

Yes, has submitted an entry
  • Thanks that does work, just trying to figure out how to pull the variable into ip address search like this {exp:freeform:entries search:ip_address="{exp:get_post_var type='user_ip'}"
    – Thomas K
    Commented May 24, 2016 at 13:13
  • I'm kinda guessing that you want to do a check against the users ip address before even presenting them the form? Does this, {exp:get_post_var type='user_ip'}, return what you're expecting when you display it on the screen? Turn on template debugging and check that the correct value is being inserted into the tag.
    – Jim Wyse
    Commented May 24, 2016 at 14:16
  • Hi Jim, outside the tag {exp:get_post_var type='user_ip'} shows the IP address. When placed inside the tag it's showing random text... {exp:freeform:entries search:ip_address="M60o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr" form_id="12" dynamic="off" limit='1'}
    – Thomas K
    Commented May 24, 2016 at 18:32
  • The duplicate detection like Jim Wyse answered is a better and easier solution. Commented May 25, 2016 at 8:07
  • I would like to hide the form before it is being presented, so I want to check the IP address against the freeform entries as they land on the site. If they have submitted an entry it will hide the popup form displayed so they don't get prompted everytime they visit the homepage. @JimWyse, do you have any suggestions?
    – Thomas K
    Commented Jun 4, 2016 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.