cforms II User Forum

Registration is currently disabled.
Guest

FAQs

Login form protected by Login LockDown.


Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Showing form to a visitor only once (only first time)
December 23, 2008
4:31 am
Silki Garg
Guest

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

December 23, 2008
9:42 am
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

It can't. There is no way you can prohibit a user to resubmit (they can always change IP, Cookies, their personal data), unless:

  1. you require the user to login (WP account)
  2. you then determine at run time, if this user has been submitting already
    1. use the cforms API call to retrieve data
  3. then either display or not display the form
    1. that logic and 2.1 needs to be your PHP code in your PHP template/file
January 7, 2009
4:40 pm
Craig
Guest

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

January 7, 2009
9:14 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

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

  1. use the PHP insert form call (see help page)
  2. make #1 dependent on whether or not the special cookie is set
  3. 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

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
26 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

tracedef: 43

mores: 21

Gyrus: 20

frozenwaste: 18

asuffredini: 15

photoworks: 14

Member Stats:

Guest Posters: 3757

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5355

Posts: 18732

Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass

Moderators: Paul (421), cnymike (8), sonika (95)

Administrators: Oliver (6400), Nicky (3)