Forum Moderators: open

Message Too Old, No Replies

Sticky Forms

         

mespejo

4:05 am on Dec 11, 2006 (gmt 0)

10+ Year Member



Could you please help me with sticky forms? I'm trying to do a registration page and want to use sticky forms so that the info user's input will stay there in case they input the wrong thing and they get an error message.

Although I was able to make text fields input to stay on but i can't make it work on a list fields.

How will i do this?

eelixduppy

2:25 am on Dec 12, 2006 (gmt 0)



>>>can't make it work on a list fields

Do you mean a select element [w3.org]? If so, you must add the 'selected' attribute to the option like so:


<SELECT NAME="flavor">
<OPTION>Vanilla
<OPTION>Strawberry
<OPTION value="RumRasin">Rum and Raisin
<OPTION selected>Peach and Orange
</SELECT>

Of course you must compare the value of the submitted variable with the value of the option to know to echo 'selected' or not.

Good luck!