Clear Button malfunction on HTML form generated by PHP

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have a HTML form that is generated in part by PHP. The action
attribute on the form tag calls itself, so that I can validate the
fields without using any other form of code like Javascript to
validate fields, etc.

All works well; fields like e-mail addresses are correctly validated
with one notable exception.

The <input type="reset" ... only works the first time the form is

If there are any problems with the fields, causing the form to refresh
with advisory data, then the Clear button does not function.

I am unable to explain this. Has anyone spotted anything similar? Do
you know why? Is there a workaround?

Many thanks.


Re: Clear Button malfunction on HTML form generated by PHP

Quoted text here. Click to load it

<input type=3D"reset"> doesn _not_ empty all the values, rather it reset=
s  =

all form values to the one in the HTMl source.

So if you're kind enough to provide them with the previous values so  =

they'll only have to change the incorrect one, those will be set. If you=

want a 'clear' button instead of a 'reset' button, you'll either have to=

use some javascript to do that, or make it a submit button and return a =

crisp form to the user on that post value.
-- =

Rik Wasmus

Site Timeline