The Javascript reset method for forms is not supposed to affect hidden inputs, but in IE8 and IE7 it does anyway. Does anyone know a way to make it behave properly?
I know I can do it by looping through individual inputs or by remembering the values before resetting the form and then restoring them but I am wondering if anyone can come up with a simpler way. Feel free to use jQuery if it will make your solution simpler. You can see an example at http://jsfiddle.net/Ddtz4/.
According to the author of the plugin, this is supposedly not an IE bug and the effect of the reset method on elements without initial values is undefined.
I am thinking of something like this, using jQuery:
Whenever I want to reset a form, I can do this: