| Post |
|
Guest
| Silki Garg 4:31 am December 23, 2008
| |
|
|
Please replace the ??? with your data!
- URL to the FORM: http://???
- The browser used: ???
- cforms version: ???
- Your Wordpress version: ???
[desc]: _
Thanks for the nice plugin. I haven't seen such a neat and highly customizable WP plugin elsewhere.
I am planning to use this plugin for a contest form on my website, where I require that a user should not be allowed to submit the form more than once.
(Draft page of the contest is available at http://webtoolsandtips.com/weekly-contest/)
How can it be done.
Thanks.
Silki
|
|
|
Admin
| Oliver Munich, Germany posts 6096 9:42 am December 23, 2008
| |
|
|
It can't. There is no way you can prohibit a user to resubmit (they can always change IP, Cookies, their personal data), unless:
- you require the user to login (WP account)
- you then determine at run time, if this user has been submitting already
- use the cforms API call to retrieve data
- then either display or not display the form
- that logic and 2.1 needs to be your PHP code in your PHP template/file
|
|
|
|
|
Guest
| Craig 4:40 pm January 7, 2009
| |
|
|
Assuming this is not a strict requirement, can it be done? In other words, if I want a cookie to identify who has already filled out a form, and I don't mind if the user clears his cookies (it will only inconvenience him), can it be done?
I don't know enough about cookies to implement it. Has anyone done this? Is there a tutorial anywhere. I posted this question in Sept. and Oliver "voted" for cookies, but I never figured out how to do it.
Thanks for the great plug-in, BTW.
Cheers,
Craig
|
|
|
Admin
| Oliver Munich, Germany posts 6096 9:14 pm January 7, 2009
| |
|
|
Craig said:
Assuming this is not a strict requirement, can it be done? In other words, if I want a cookie to identify who has already filled out a form, and I don't mind if the user clears his cookies (it will only inconvenience him), can it be done?
yes. you'd have to
- use the PHP insert form call (see help page)
- make #1 dependent on whether or not the special cookie is set
- if form is submitted (no cookie was detected) you need to set the cookie
re #1 and the rest of the code has to be added to your page template (you can create a new template).
re #2 see the online PHP manual for COOKIE management
re #3 use cforms' my-functions.php / action routine to set the COOKIE
|
|
|
|