Forum Moderators: coopster

Message Too Old, No Replies

Reset button doesn't work on Sticky Forms

         

yellow_nemo

10:20 pm on Apr 18, 2005 (gmt 0)

10+ Year Member



True or False?

I am working on a sticky form using PHP and Javascript and the reset button doesn't seem to work once I've submitted the form once. It works before I press submit. That makes sense to me actually since the data are in the post variables. But I just want to double check. Thanks!

jatar_k

11:09 pm on Apr 18, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld yellow_nemo,

makes sense to me too as the value is explicitly set once it is posted, haven't personally tested it though.

I guess you could make a custom reset button that would resubmit to the initial blank form or hide it all together once it has been submitted once.

moltar

11:28 pm on Apr 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



From W3C's HTML 4.01 Specification [w3.org]:

reset buttons [w3.org]: When activated, a reset button resets all controls to their initial values [w3.org].

Each control has both an initial value and a current value, both of which are character strings. Please consult the definition of each control for information about initial values and possible constraints on values imposed by the control. In general, a control's "initial value" may be specified with the control element's value attribute.

Basically what it says is that when you press reset it returns the form to the state at which user loaded it. If user loaded a form and it was already filled out (sticky) then if user modifies it and presses reset then it will return to the values it was loaded to, not to blank values (unless it was loaded with blank values).