WordPress.org

Support

Support » Plugins and Hacks » How to block a user from multiples response or Allow only one response per user

How to block a user from multiples response or Allow only one response per user

Viewing 2 replies - 1 through 2 (of 2 total)
  • Steve Valencia

    @lonewolf95665

    Hi.. I just came across this post looking for something else. Hmmm.. You comment is raising some questions about “Who” you want to use your forms.
    Plugging in S2member would require a certain level of subscription to have access to certain pages…including the one with the form.

    If someone is sending in the form over and over again do they know you will shut them off?

    Or, maybe you want to just have them use a blog / post page and then you can limit the number of posts.

    If I had someone abusing the forms I would deactivate their account and send them an email.

    BijouLePou

    @bijoulepou

    Hi,

    I have registered members with S2members and I want them to answer some question (survey) after they used some of our pedagogical tools. So I want their opinion only once.

    This is the answer Ninja Form team sent me.

    This isn’t something that Ninja Forms does out of the box, but it would be fairly easy to implement using our WordPress action hooks and filters.
    If you are requiring your user to be logged-in at the time of submission, you could use the ninja_forms_pre_process http://wpninjas.com/ninja-forms/docs/developer-api/actions/ninja_forms_pre_process/ action and check the submission database for an existing submission using the user’s id and the ninja_forms_get_subs http://wpninjas.com/ninja-forms/docs/developer-api/functions/ninja_forms_get_subs/ function.
    If the submission exists, you would simply add an error using $ninja_forms_processing http://wpninjas.com/ninja-forms/docs/developer-api/ninja_forms_processing/, and it would prevent the submission from being completed and display whatever error you wanted.

    I didn’t developed it, but if any one does, I’d like to see the code. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to block a user from multiples response or Allow only one response per user’ is closed to new replies.