View Full Version : Clear / Reset button not working after return from error page
Maverick
24-Jul-2007, 06:22 AM
I'm not sure if this is actually a bug or not. If not could you suggest a solution?
If you make an error on the form, go to the error template and use the return button the clear button no longer clears the form.
Nothing major but just thought i would ask.
Thanks
russellr
24-Jul-2007, 07:03 AM
Hi,
That's interesting.
I can't think why that would be because the "Clear" button or form reset is purely a function of the browser.
I assume you mean the "return to form" feature of FMBadHandler, correct?
Maverick
24-Jul-2007, 05:32 PM
Correct, it just seems to treat the text that is there as if it was there to start with but still clears anything new you put in other fields.
russellr
24-Jul-2007, 10:15 PM
Hi,
Actually, when I checked out the definition of a reset button, it's working as it should: http://www.w3.org/TR/html4/interact/forms.html#reset-button
The error return puts your original entries back into the form.
It does this by setting the "value=" attribute in INPUT tags (and similar for other tags).
So, once you return to the form, the form's initial values are your original entries.
Based on this definition, the browser is working correctly.
It might not be what you want, but it is correct.
If you really want a complete reset of all fields, then change your reset button to redirect them back to the original form URL.
Maverick
24-Jul-2007, 10:42 PM
Ah ok, ya i figured as much. I'll just change the clear button to be a link then.
Thanks
Powered by vBulletin® Version 4.1.4 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.