Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Nov 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Web Poll using forms - Can I restrict from submitting the form more than once.

    I am putting an opinion poll on a site which I am hoping to set up as a form since the results will not be published immediately. Is there any way to ensure that the form will only be able to be submitted once (possibly using cookies?).

    I don't have any experience of ASP or PHP etc so ideally, I would like a javascript solution if possible.

    I'd be very grateaful for any sugestions.
    Last edited by signal; 07-10-2003 at 10:11 AM.

  • #2
    Regular Coder ellisd5's Avatar
    Join Date
    Jun 2002
    Location
    Uk
    Posts
    160
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Yea you can create a cookie to store weather the form has already been submited. Of course anyone can delete cookies so if they do then they can do the poll again

    I would not have a submit button rather a normal button calling a js function.

    Code:
    function submitFunction () {
    //create cookie
    ...
    ...
    ...
    document.myform,submit();
    }
    You would then have to check to see if theres a cookie to detainmie weather ot not to show the form or not.

    You say say that you dont know asp or php etc.... but you will need some serverside language to store you results.

  • #3
    New to the CF scene
    Join Date
    Nov 2002
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Serverside storage

    Thanks hharchester.

    My plan is to process the form with form mail and sort the results manually for now as I expect the volume to be low enough. If the response is better than expected, I will be able to justify a mail package such as Multicity.com's one which seems quite good.

    Thanks for the code. I am going to look at the cookies option some more and will hopefully solve it.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •