Reset button cannot clear fields after displaying error messages  
Author Message
pc.leung





PostPosted: 2004-7-9 13:54:00 Top

java-programmer, Reset button cannot clear fields after displaying error messages Hello

my form extends from ValidatorForm
and making use of validator.xml and validator-rules.xml,

The reset button can clear fields within form
if the submit is not pressed.

If I pressed the submit button and
error messages display on the top of the form.
And then now I click the reset button again,
fields cannot be cleared.

Why is it so?
 
Murray





PostPosted: 2004-7-9 16:53:00 Top

java-programmer >> Reset button cannot clear fields after displaying error messages
"PC Leung" <email***@***.com> wrote in message
news:email***@***.com...
> Hello
>
> my form extends from ValidatorForm
> and making use of validator.xml and validator-rules.xml,
>
> The reset button can clear fields within form
> if the submit is not pressed.
>
> If I pressed the submit button and
> error messages display on the top of the form.
> And then now I click the reset button again,
> fields cannot be cleared.
>
> Why is it so?

That is correct behaviour for a form reset button. It isn't a *clear*
button, it's purpose is to *reset* the fields to the state they were in when
the page was loaded. Think of it more like an undo button. If you want to
clear fields, I think you'll have to write a custom javascript function