Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question default form option value...

    Hey

    Is it possible to set a default value for a form option like this:

    <form>
    <select>
    <option>Blue</option>
    <option>Red</option>
    <option>Yellow</option>
    <option>Green</option>
    </select>
    </form>

    Normally blue would come first. Now my quesstion is can i get yellow to come first? Without moving it over blue in the code.

  • #2
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,387
    Thanks
    32
    Thanked 288 Times in 282 Posts
    Code:
    <option selected="selected">Yellow</option>
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •