'Remove thanks page on FormSubmit
I'm attempting to remove the "thanks" page on my FormSubmit code. I have a function that displays a "success" message below my form, but it's not working because of the thanks page and the redirection. Any advice for this?
<form action="https://formsubmit.co/[email protected]" method="POST">
<div class="form-group">
<label for="Nombre"> Nombre</label>
<input type="text" id="firstName" name="Nombre" required>
<input type="hidden" name="_subject" value="Nueva consulta web">
</div>
<div class="form-group">
<label for="Apellido">Apellido</label>
<input type="text" id="lastName" name="Apellido" required>
</div>
<div class="form-group">
<label for="Email">Email</label>
<input type="email" id="email" name="Email" required>
</div>
<div class="form-group">
<label for="Mensaje">Mensaje</label>
<textarea name="Mensaje" id="message" cols="30" rows="3" placeholder="Escribinos tu mensaje" required></textarea>
</div>
<input type="hidden" name="_captcha" value="false">
<button type="submit">Enviar</button>
<input type="hidden" name="_template" value="table">
<input type="hidden" name="_next" value=" ">
</form>
Solution 1:[1]
You can provide an alternative URL for "Thank You" page.
<input type="hidden" name="_next" value="https://yourdomain.co/contact">
This will work as redirect route, and teleport you on that contact page without showing thank you message screen. Then you can just add an onClick event listener that will show you "success" message.
Solution 2:[2]
I'm also checking out FormSubmit, and they have a section in their documentation page that explains how to get rid of it:
"By default, after submitting a form the user is shown the FormSubmit "Thank You" page. You can provide an alternative URL for "Thank You" page."
<input type="hidden" name="_next" value="https://yourdomain.co/thanks.html">
So, in your form HTML tags, add that line of code and swap out "https://yourdomain.co/thanks.html" with your own URL
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Deep Bansode |
Solution 2 |