-1

I'm using ninja forms and want the site visitor to only see the form once. This doesn't seem to be a function of Ninja Forms it self.

Not knowing too much... Can I add some code that will use cookies and determine whether or not a visitor has already seen the form, and if so hide it the second time?

Even better yet replace the form with message in it's place. Something like "Sorry only one submission per person"

I did see something about "localStorage" in my research.

I also see this post but don't really understand how or if I can use it for my needs Set cookie and get cookie with JavaScript

Karl
  • 11
  • 2

2 Answers2

1

You could use some browser fingerprinting library which generates a unique ID per device. Store the id and check when creating the page with the form.

Here's one such lib made in Javascript. You'd need to take that ID and pass it to server level.

https://github.com/delboy1978uk/jquery-browser-fingerprint

delboy1978uk
  • 12,118
  • 2
  • 21
  • 39
0

I needed exactly the same feature two weeks ago for a voting, so I created a simple add-on. It limits submissions via cookie. That's not bulletproof, but good enough for a simple voting or survey. The plugin is free in the WordPress plugin repository: Ninja Forms Submission Limit Cookie

Hannes
  • 135
  • 3