SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,381
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    show all the choices at once

    I am developing a select "How did you find out about...?" field on a subscription sign-up page.
    http://test.kripalu.org/ctlg_order.php
    I have a request to have all the choices show at once without the scroll, as there are only five more than show now when you first click. My current code is:
    HTML Code:
     <option selected value="">Please select One</option>
    <?php
    while ($how = mysql_fetch_array($how_found)) {
    $name = $how['name'];
    $code = $how['code'];
    echo "<option value='$code'>$name</option>\n"; 
    }
    ?>
    </select>
    Any thoughts?
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,158
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HTML Code:
    <select name="nnn" size="5">
    ...
    </select>
    ?
    Birnam wood is come to Dunsinane

  3. #3
    Web Enthusiast
    Join Date
    Jul 2000
    Location
    Western Massachusetts, USA
    Posts
    1,381
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks. That was easy!
    Paul C.
    ClickBasics
    http://www.clickbasics.com

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Alternatively, you can try using radio buttons, which are nicer when there are only a few options to choose from


Bookmarks

Posting Permissions

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