Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS Avoid multiple form submissions OR allow and send to different URL for "Thank You" page

Jean

Coder
Hi!

Would it be possible to avoid multiple form submissions OR allow multiple form submissions and send them to different URL for "Thank You" page?

Maybe via IP, Cookie or something?

Example AVOID:

Someone submit form once but if s(he) submit twice or more submissions is ignored only forwarded to "Thank You" page.

Example ALLOW:

Someone submit form once but if s(he) submit twice forwarded to "Thank You" page 2.
And if submit form again forwarded to "Thank You" page 3.
And if submit form again forwarded to "Thank You" page 4.
And so on
 
Hey Jean,

So you could do a thankyou page with the random like i showed you before :D

How you tackle this will depending on what you are doing, Are you submitting these to a database?
 
Hi Simon!

In this case random would not be my idea.

Example ALLOW:

Someone submit form once but if s(he) submit twice forwarded to "Thank You" page 2.
And if submit form again forwarded to "Thank You" page 3.
And if submit form again forwarded to "Thank You" page 4.
And so on

So here I would prefer a fixed sequence like 1,2,3,4,5,1,2,3,4,5 or something like that.

Example AVOID:

Someone submit form once but if s(he) submit twice or more submissions is ignored only forwarded to "Thank You" page.

Would this be possible via IP, Cookie or something?

P.S. Right now I connect my HTML Form to extern form endpoint and they email me the submissions.
So at the moment there is no PHP, Javascript or any backend code required.

Regards

Jean

 
Hi Simon!

This is one form code I use.

<form action="https://formsubmit.co/[email protected]" method="POST" enctype="multipart/form-data" style="max-width:320px"> <input name="name" type="text" id="name" placeholder="Your first name" required> <input name="email" type="email" id="email" placeholder="Your application email" required> <input type="hidden" name="_captcha" value="false"> <input type="hidden" name="_next" value="https://domain.com/thankyou1"> <div class="custom-file mt-2 col-md-12"> <input type="file" class="custom-file-input" id="InputFile" required> <label class="custom-file-label" for="InputFile" data-browse="Upload CV"><p class="text-success">Your CV - max. 5MB</p></label> </div> <br><br> <small>The upload speed depends on your file size and your internet speed. Please allow a few seconds for this process.</small> <br><br> <div class="check"> <div class="custom-control custom-checkbox mb-3"> <input type="checkbox" class="custom-control-input" id="customCheck" required> <label class="custom-control-label" for="customCheck"><small>I agree to receive communications regarding my application.</small></div> <div class="check2"> <div class="custom-control custom-checkbox mb-3"> <input type="checkbox" class="custom-control-input" id="customCheck2"><label class="custom-control-label" for="customCheck2"><small>I agree to get new job offers by email. (Optional)</small></div> <small>I can unsubscribe from these communications at any time.</small> <div class="mt-3"> <button type="submit" class="btn btn-success">Apply</button> </div> </form> </div>
 

New Threads

Buy us a coffee!

Back
Top Bottom