Forums

Limit one form per person

imfritzy 17 Feb, 2011
Is there a way for a Chronoform form to detect that a visitor has already filled out the form and prevent the visitor from doing so twice?

Is it possible to allow two completions of the form, but prevent a third completion?

Thank you.
GreyHead 17 Feb, 2011
Hi imfritzy,

You can do this by adding a MySQL query at the beginning of the Form HTML that checks the database table for saved submissions by the current user.

Bob
imfritzy 17 Feb, 2011
Thank you. Unfortunately, I am not a programmer, so I need more hand-holding!

If you don't mind me asking, what precise script or code would I insert at the beginning of the form code?

My precise goal is to send a link to the form through an email sent to 500 people, and limit to exactly one the number of times each email recipient can fill out the form. If two email recipients use the same computer and IP address, I would like for both recipients to be able to fill out the form once per recipient. Thus, I want an email-sensitive filter, rather than an IP address filter.

As an less desirable alternative, if an email-sensitive filter is not possible, is to limit to exactly two the number of responders from each IP address that accesses the firm in response to the delivered emails.

I would be grateful if you could advise me on what code to use.
GreyHead 17 Feb, 2011
Hi imfritzy,

Then you'll probably need to find someone more experienced to work on this with you.

You will need (a) to save the form data to a database table using a DB Connection then (b) check when the form is submitted if there are already entries for that email by querying the database. You'd probably do this in the Server Side validation box. (It will only work in the Form HTML if they are registered users.)

I can help out when you get stuck, or if you have a specific problem. But, as it says in the forum guidelines, it simply isn't practical to write your code for you. Sorry.

Bob
imfritzy 17 Feb, 2011
Thank you. I understand. Even your limited answer is very helpful

Again, thanks for a great product and such prompt service.
This topic is locked and no more replies can be posted.