Forum Moderators: phranque
When users close the new window after checking their emails, they will see the original page that contained the form with all the fields filled.
Is there a way to submit the form and clear all the fields at the same time?
Thanks
Be Positive
<form name = "formname" method = "post" action = "/scripts/somedir/some.pl" onsubmit = "return final_check()">
<input type = "hidden" name = "to" value = "">
<input type = "hidden" name = "data1" value = "">
<input type = "hidden" name = "data2" value = "">
<input type = "submit" value = "Submit">
<input type = "button" value = "Clear Form" onclick = "clearcart()">
</form>
1. The form's onsubmit does a validation check BEFORE submitting. The final_check() function can obviously include a call to a function that clears the cart.
2. A form button uses an onclick to clear the cart.