This Message Forum is no longer in use

Please use the new Bravenet Help Forums FOUND HERE

General Forum
This Forum is Locked
Author
Comment
Passing Dropdown Menu Value to Next Page

I'm putting together a form with several required fields. If a required field is left blank, the form is redisplayed, with all previously entered values already filled in with the answers that were submitted.

Everything works fine when the form is redisplayed, except for the dropdown menu. It contains all 50 states and the District of Columbia as its values.

Is it possible to have the correct state set to "selected" when the form is redisplayed?

Browser: Firefox, IE

Re: Passing Dropdown Menu Value to Next Page

Yes, it should be possible to set the state of a dropdown to "selected". The exact method depends on how you are validating and re-displaying the form. I assume your using PHP for this but without a link to your code, it's only a guess.

If your using PHP, you might want to take a look at this link on Retaining drop down list box value of a form after posting and this one on Dynamic populating the drop down list based on the selected value of first list. They both deal with managing dropdown menus from PHP.

Browser: Firefox, Netscape, Sea Monkey, Internet Explorer, .....

OS: Solaris (Sparc,x86), Linux, XP

Re: Passing Dropdown Menu Value to Next Page

That's exactly what I needed!

Thank you SO much, and sorry about not posting my code or linking to it.

Browser: Firefox, IE