Hello Everybody!
I'm using servers side validation in my form where the field values are republished via HTML-code like this:
If the form is reloaded in case of a validation error there is no chance to clear all field via a input type="reset" button, because the initial value, after the republished load, is not empty.
My idea was to have two submit buttons with different name. This way I could catch the case where the second submit button called "reset fields" was pressed. In this case I would be able to cleare the $_POST hash values of the form field which then should lead to cleared form field values.
Any other ideas on this problem?
Thank you for your help.
I'm using servers side validation in my form where the field values are republished via HTML-code like this:
<input type="text" name="email" value="<?php echo $_POST['email']; ?>" />
If the form is reloaded in case of a validation error there is no chance to clear all field via a input type="reset" button, because the initial value, after the republished load, is not empty.
My idea was to have two submit buttons with different name. This way I could catch the case where the second submit button called "reset fields" was pressed. In this case I would be able to cleare the $_POST hash values of the form field which then should lead to cleared form field values.
Any other ideas on this problem?
Thank you for your help.