[thelist] clear form code

Luther, Ron Ron.Luther at hp.com
Mon Mar 20 10:39:10 CST 2006


Joel Canfield (and Ian and maybe a few others) asked:

>>I too would like to hear input on forms where the need to be able to
clear it 
>>without other workarounds outweighed the risk of giving users a
'destroy everything 
>>I just typed' button. Not trying to be argumentative, honest I'm not;
that's just my 
>>perception of how the 'reset' button works.


I've used them on some 'search' form 'front-end's where I'm gathering
end user 
parameters for running a report and offering a dozen different search
criteria.

These were cases where I didn't want to go with automagically resetting
the form 
to default on entry since I wanted to allow the user to be able to go
back and review the 
input parameters they entered after execution. (That way they can see
whether they 
didn't get any results because they mistyped a part number or
something.)

Sometimes I'll write a routine to cycle through the possible search
selections; see if 
the entered value has length > 0 and determine if I need to instantiate
a new 'where' 
clause or tear one down that isn't being used. .... Sometimes I'll just
add an easy 
'reset' button to the form to clear out the text fields and associated
where clauses 
and be done with it.


Sometimes it comes down to how much time you have to work on the form.
Sometimes it comes 
down to what your users might prefer. Sometimes it comes down to what
the technology 
will or will not let you do.  [Not every technology gives you this much
flexibility.]


HTH,

RonL.



More information about the thelist mailing list