Dynamic Form list/menu

I'm trying to insert a dynamicly generated form list/menu dropdown item.
Everything works but the list always shows me the last record from the database as the first item in the list (ASC or DESC).
I want to put a dummy label as the first item in the list like: Select from list
How can i do this, because even if i put a static value in the value list items, it still shows the last item from the recordset first instead of the static value.
Does anybody have an idea how i can create a dynamic pulldown list in my form with the first item listed to be a statich dummy tekst or label like "Select from list etc"
Thanks,

I created a normal recordset with Dreamweaver getting tea
m_id and team_names out of the database. Then i list the teamnames in a form list/
menu (dropdown) to show all the available teams. Again it shows me the last record from the
recordset as the first list item and i want a standard "select this" text or something default.
The form code below is generated by dreamweaver itself. I already tried to also put one static value in the value list property but i get the same result. To me it looks like the while loop is overriding whatever you put as static text.
<form id="form1" name="form1" method="post" action="">
  <label for="list_teams">Teams:</label>
  <select name="list_teams" id="list_teams">
    <?php
do { 
?>
    <option value="<?php echo $row_Teams['team_id']?>"<?php if (!(strcmp($row_Teams['team_id'], $row_Teams['team_id']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Teams['team_name']?></option>
    <?php
} while ($row_Teams = mysql_fetch_assoc($Teams));
  $rows = mysql_num_rows($Teams);
  if($rows > 0) {
      mysql_data_seek($Teams, 0);
   $row_Teams = mysql_fetch_assoc($Teams);
?>
  </select>
</form>

Similar Messages

  • How do I make my form (list/menu) items open in the same window (self).

    Hello, the kind, brilliant people on this forum have always been able to help me in the past, so I thought I'd give it a try today. Items in a form (list/menu) that I've created are opening in a blank window (pop-up) when clicked. I would like them to open in "self" mode so that pop up blockers on various computers don't become a challenge for site visitors. Can anyone please tell me how I could make that adjustment? I selected the entire form "red dotted line" around the list and changed the "target" in the properties menu to "self". Then I selected everything on the page and still not correct. I am inserting the code below. Any assistance to get me on the right track would be GREATLY appreciated!! BTW I also made the form a library item (just in case that fact is needed). Also if you need to see the actual link it is http://www.graphicmechanic.com/DEKALBCOUNTY/index.html. The "I WANT TO" list is the part I'm referring to.
    CODE BELOW:
    <form action="" method="post" name="form1" target="_self" class="style26" id="form1">
                       <a href="#" target="_self"><span class="style26">
                       <label FOR="iwantto">I WANT TO:</label>
                       <br />
                        <img src="../images/5x5.gif" alt="layout graphic" width="5" height="5" /><br />
                        <select name="iwantto" id="iwantto" class="style55" onchange="MM_jumpMenu('window.open()',this,0)">
                          <option value="http://web.co.dekalb.ga.us/voter/#">REGISTER TO VOTE</option>
                          <option value="https://govaffiliate.ezgov.com/ezutility/index.jsp?agency=3411">PAY MY WATER BILL</option>
                          <option value="../humanserv/hs-osa-facilities.html">FIND A SENIOR CENTER</option>
                          <option value="../humanserv/hs-lou-walker.html">GET INFO ABOUT LOU WALKER CENTER</option>
                          <option value="http://www.dekalbstatecourt.net/">FILE A RESTRAINING ORDER</option>
                          <option value="http://www.dekalbcountyanimalservices.com/">REPORT A LOOSE DOG</option>
                          <option value="http://web.co.dekalb.ga.us/courts/recorders/payment.asp">GET TRAFFIC CITATION INFO</option>
                          <option value="http://web.co.dekalb.ga.us/courts/probate/pistol.htm">APPLY FOR A PISTOL LICENSE</option>
                          <option value="http://web.co.dekalb.ga.us/courts/probate/marriage.htm">GET A MARRIAGE LICENSE</option>
                          <option value="http://www.co.dekalb.ga.us/dekalbflic/Centers.htm#service">FILE FOR A DIVORCE</option>
                          <option value="http://www.co.dekalb.ga.us/superior/index.htm">GET INFORMATION ABOUT JURY DUTY</option>
                          <option value="http://web.co.dekalb.ga.us/taxcommissioner/search.asp">PAY MY TAXES</option>
                        </select>
                       </span>
                       </a>
    </form>

    Looks like it still isn't working. When I removed those items the drop down menu stopped working as well. I went ahead and posted yours as the correct answer. I'm convinced it's my skill level. i'm gonna do some javascript searches to see where the js code should go, it's very confusing to me. Here is that code in case anything sticks out to you or anyone else.
    <link href="../cssfiles/lbistyles.css" rel="stylesheet" type="text/css"/>
    <form action="" method="" name="form1" class="style26" id="form1">
                     <span class="style26">
                       <label FOR="iwantto">I WANT TO:</label>
                       <br />
                        <img src="../images/5x5.gif" alt="layout graphic" width="5" height="5" /><br />
                        <select name="iwantto" id="iwantto" class="style55">
                        <option value="#" onClick="MM_goToURL('self','http://web.co.dekalb.ga.us/voter');return document.MM_returnValue">REGISTER TO VOTE</option>
                          <option value="https://govaffiliate.ezgov.com/ezutility/index.jsp?agency=3411">PAY MY WATER BILL</option>
                          <option value="../humanserv/hs-osa-facilities.html">FIND A SENIOR CENTER</option>
                          <option value="../humanserv/hs-lou-walker.html">GET INFO ABOUT LOU WALKER CENTER</option>
                          <option value="http://www.dekalbstatecourt.net/">FILE A RESTRAINING ORDER</option>
                          <option value="http://www.dekalbcountyanimalservices.com/">REPORT A LOOSE DOG</option>
                          <option value="http://web.co.dekalb.ga.us/courts/recorders/payment.asp">GET TRAFFIC CITATION INFO</option>
                          <option value="http://web.co.dekalb.ga.us/courts/probate/pistol.htm">APPLY FOR A PISTOL LICENSE</option>
                          <option value="http://web.co.dekalb.ga.us/courts/probate/marriage.htm">GET A MARRIAGE LICENSE</option>
                          <option value="http://www.co.dekalb.ga.us/dekalbflic/Centers.htm#service">FILE FOR A DIVORCE</option>
                          <option value="http://www.co.dekalb.ga.us/superior/index.htm">GET INFORMATION ABOUT JURY DUTY</option>
                          <option value="http://web.co.dekalb.ga.us/taxcommissioner/search.asp">PAY MY TAXES</option>
                        </select>
                       </span>
                       </a>
    </form>

  • Number of characters in a dynamic form/list/mysql table

    Hi all,
    I mentioned this in a previous post but wanted to give it a home of it's own.  I have a dynamic list, updated and edited by a dynamic form.  However, with one of the columns I can only fit about 50% / 4 lines of text in.  I am unsure whether the problem lies in the Form, when ebtering the text - or the List when displaying it.  (I presume it will not be connected to the Mysql table itself...?)
    When I enter the info into the Update Form, the text area accepts all the characters.  However, when I hit update and am returned to the list only about half show.  Also, if I then return to the form to update again - only about half are shown in the Update Form - the sentence is simply cut off about half way.  This leads me to believe that it is a problem with the Update Form rather than the List - but hey, if I had the answers I wouldn't be here.
    Jpg attached to try an explain my rabid ramblings...

    Hi Nathan,
    NJFuller wrote:
    When I enter the info into the Update Form, the text area accepts all the characters.  However, when I hit update and am returned to the list only about half show.  Also, if I then return to the form to update again - only about half are shown in the Update Form - the sentence is simply cut off about half way.  This leads me to believe that it is a problem with the Update Form rather than the List - but hey, if I had the answers I wouldn't be here.
    let´s make a bet, OK ? My bet is that the corressponding database column which stores the textarea value is "varchar" and has been set to accept a max. value of approx. 100 chars, correct ?
    Cheers,
    Günter

  • Dynamic Forms & Lists

    Hi All
    i have 4 tables (A, B, C, D) and i created dynamic list using Dynamic List Wizard and the result was ok showed all the Fields (using recordset).
    now i wanna create a Dynamic form to insert into those 4 tables, so from the dynamic list if i click edit, delete... it takes me to the same page where i can edit, delete or update.
    i tried many things like insert into 2 tables but did not work because the link transaction did not work plus in this case i have to create delete page, insert page and update page which already made me lost.
    please help

    Hi grandlorie,
    Sorry for bothering, but is there anyone who can explain in details how to do that i can not go any further with my project?
    in regards to the Custom Triggers I mentioned:
    1. please open the ADDT helpfile from the Control Panel´s Help button
    2. read the section "Custom transaction and triggers", which also provides some PHP code examples to get you started.
    You will notice that Custom Triggers (respectively what you can do with them, respectively what code should go in there) doesn´t allow for providing ready-made solutions, as it all depends on aspects like your table structure etc.
    Cheers,
    Günter Schenk
    Adobe Community Expert, Dreamweaver

  • Set Hyperlinks in Form List/Menu?

    I'm new to adding form items to my sites and I'm wondering if
    it's possible to set each item in a drop down menu to hyperlink to
    another site. I'm sure it is, but I'm missing where you place the
    link. I thought perhaps it went in the value field, but realize now
    it doesn't. Or is there another method I should use to create a
    link menu?

    This is helpful - thank you for the reply.  However, this is all code and looks pretty complex to me.
    It's not hard.  Just work through the tuts  and learn  to not be afraid of code view. 
    Sure wish there was a solution in design mode (with just a little code checking).
    "Dream a little Dream" 
    http://www.youtube.com/watch?v=vZPmZ64m3_4
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • Visual Composer - dynamic entry list in a form

    Hi everybody,
    I have a question about Visual Composer (NW7.1).
    My goal is it to create a dynamic form within VC iView. As data source I want to use (reads) values from a customizing table and displayed them in a drop down menu. After selecting a drop down value, all its elements shall be presented dynamic in a form. My question is if VC is supporting that technically or not. I have tried different approaches but it is not working.
    Does anybody have some suggestions???
    For example:
    To show all customer data in a form, I set a reference in my customizing table that refers to my KNA1 table. If I want to show all suppliers data, I want to refer to my customizing with a reference to table LFA1. The form should display all the elements of KNA1 or LFA1. Is something like that technically possible?? HELP!
    Thank you for your help in advance.

    Hi Anja,
    you understood me correct. However this was just an example.
    1. Having some drop down list to select an entry.
    --> in this drop down list there should be master data objects e.g. customers, suppliers, ...
    2. Depending on the entry you like to display a form either filled with values of KNA1 table or LFA1 table.
    --> If I choose customers all information should be displayed in the form. If I choose suppliers all supplier's information should be displayed in the form.
    My task and my goal is it to use a customizing table in which I save SAP BI InfoObject. In my drop down menu I want to be able to select one of these object (e.g. customer master data). In the next step there should be a dynamic list for my form. That means if I change my object by selecting another drop down item - it will be automatically change the list entries from my new object
    How can I do that?
    Thank you so much.
    Tom

  • Dynamic List/Menu After Update

    Hi All,
    Dreamweaver - ASP
    I have a form to add records. The first field is a dynamic list/menu to select the date.
    After the Add record button is pressed the page reopens but the date menu has reverted to "Select date"
    Is there a way to retain the previously chosen date when the page refreshes?
    Many thanks
    John

    Hi All,
    Solved the problem.
    I set  up a session variable for the date and then used the 'Dynamic' button for the List/Manu, Select Value equal to,  and selected the session variable.
    Regards
    John

  • Dynamic List/Menu with 2 columns

    I have created a Dynamic List/Menu box based on a recordset and showing me one field of that recordset ['Firmanaam'].
    <?php
    do { 
    ?>
                <option value="<?php echo $row_klantenselectie['Firmanaam']?>"><?php echo $row_klantenselectie['Firmanaam']?></option>
                <?php
    } while ($row_klantenselectie = mysql_fetch_assoc($klantenselectie));
      $rows = mysql_num_rows($klantenselectie);
      if($rows > 0) {
          mysql_data_seek($klantenselectie, 0);
       $row_klantenselectie = mysql_fetch_assoc($klantenselectie);
    ?>
    First question what is the difference between 'values" and 'labels' in the creation box of the Dynamic List/menu as only the field entered in the 'labels" is shown in the listbox ?
    Secondly I want to display two columns in the List box (one column with the client ID and one column with the clients name). How do I proceed ? Afterwards clicking on the selected client should send the client ID to another field in the form.
    Thank you for your replies.

    Moved to the Develop server-side applications in Dreamweaver forum, which deals with this sort of issue.
    First question:
    The Values field in the Dynamic List/menu dialog box populates the value attribute in the opening <option> tag. Because it's an HTML attribute, it's not displayed when the page is rendered in a browser. The Labels field puts the text that will be displayed in the drop-down menu between the opening and closing <option> tags.
    Put the value you want displayed in the Labels field, and the value you want sent to the server when the form is submitted in the Values field.
    Second question:
    Normally, you would put the ID in the Values field, and the name in the Labels field.
    Because the value attribute will contain the ID, it shouldn't normally be necessary to populate another field with the selected value because the ID will be sent to the server with the rest of the form data when the form is submitted.

  • Populate List/Menu in Update Record form

    I am creating an update record form that contains a list/menu
    (with values General, 2002, 2004, 2006)
    How do I populate this menu so that it pulls current value
    from database, and not just the top default value each time?

    Swn-Y-Mor wrote:
    > I am creating an update record form that contains a
    list/menu (with values
    > General, 2002, 2004, 2006)
    >
    > How do I populate this menu so that it pulls current
    value from database, and
    > not just the top default value each time?
    Select the menu object in the form. Then click the Dynamic
    button in the
    Property Inspector. In the dialog box that opens, click the
    lightning
    bolt next to Select value equal to. Finally, choose the data
    field from
    the correct recordset.
    David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    http://foundationphp.com/

  • Ensure List/Menu populate my update form with the correct data before update

    Hello,
    Please how do I ensure my update form is populated with the correct data before update?
    On my update page I have text fields and select fields (dynamic list/menu). When I open my profile page to make updates, I see the field well positioned in the text fields but in the select list/menu fields, I see "Select from list" instead of the value that was initiated selected
    Correct Values before update
    Wrong values during update
    As you can see from the images below, when I open the update page, the list automatically populate the select fields with the last values in the list instead of the Initial values that where selected by the user before the update.
    Can anyone please review and let me know where I have gone wrong.
    Thank you
    Mike

    Hello All,
    Once more thank you. I have sorted the issue out.
    I observed that I was selecting the wrong field. I selected the field matching the record set of the select instead of the field matching the record set of the table I am working as seen on the image belew
    I was selecting this - This is the record set of the table that hold values for the city select list
    Instead of this. This is the record set of the table behind the form I am working on
    My issue is now re-solved.
    Mike

  • How do I pass a username form variable from a drop down list/menu to another page?

    Hi,
    I have a login_success.php page that has a drop down list/menu (which lists usernames). I want the user to click on their user name, and when they click the submit button the username information to be passed over to the username.php page which will contain a recordset, sorted by username.
    How do I pass the username info from the drop down list/menu to the username.php page?
    The drop down menu is connected to a recordset listUsername, I have filtered the recordset with the Form Variable = username, and I have used the POST method to send the username to the page username.php. I'm not sure how to structure the php or which page to place it on.
    <form id="form1" name="form1 method="post" action="username.php">
         <label for="username_id">choose username:</label>
         <select name="username_id" id-"username_id">
              <option value="1">username1</option>
              <option value="2">username2</option>
              <option value="3">username3</option>
              <option value="4">username4</option>
         </select>
         <input type="submit" name="send" id="send" value="Submit" />
         <input type="username" type="hidden" id="username" value="<?php echo $row_listUsername['username']; ?>" />
    </form>
    Could somebody help me please?
    Thanks.

    I would not post the variable over, In this case I personally would send it through the URL and use the $_GET method to retreve it. For Example.
    <html>
         <head>
              <title>Test Page</title>
              <script type="text/javascript">
                   function userID(){
                        //var ID = form1.userIDs.selectedIndex;
                        var user = form1.userIDs.options[form1.userIDs.selectedIndex].value;
                        window.location = "test.html?userID=" + user;
              </script>
         </head>
         <body>
              <form id="form1">
                   <select name="userIDs" id="userIDs" onchange="userID();">
                        <option>Select a User</option>
                        <option value="1">User 1</option>
                        <option value="2">User 2</option>
                        <option value="3">User 3</option>
                        <option value="4">User 4</option>
                   </select>
              </form>
         </body>
    </html>
    //PAGE TO RETRIEVE THE USERNAME
    <?php
    if(isset($_GET['userID'])
         $userID = $_GET['userID'];
         echo $userID;
         die;

  • PHP dynamic content for form list field on tabbed panel

    I have been trying to use PHP dynamic content to populate a
    form list field. Works fine on a regular page, but doesn't seem to
    work (or works very erratically) if the form is on a tab of a Spry
    tabbed panel. Erratically means (as I've observed) the values will
    appear if the list field is the second on a tab but not the first.
    Haven't tried three on a tab... Anyone know if this is supposed to
    work?

    Thank You !!! to both of you above.
    Shant,
    The scheme youv'e proposed makes sense and I had thought of the same before posting the question. I already did a little POC on it but then realised this works if I can use complete list of values of 1st Field to decide the value of 2nd and so forth. But I rather need to know which one among those was clicked. Moreover, my right side list is usually not null when page loads for the first time (bcoz Field name is a path exp).
    Also, the real problem here is that, when I click on different values on the right side of multi-select(already selected values) of 1st Field, allowedValues and Derivation of 2nd should change. That GUI event is not capturable from whatever I've been able to read (onClick is not applicable for MultiSelect, and onChange doesn't serve my purpose, coz I need to know what value was clicked on).
    The solution I thought and implemented was to take the right side of multi-select, into an extra (read redundant), single-select Field. And then have the 2nd multi-select depend on it via Derivation and allowedValues.
    Having two redundant single-selects, isn't the most elegant solution but I can't think of anything better. Any thoughts ???
    If I'm not really overlooking something MultiSelect class should have an extra Property exposed....
    - AndyDev
    Edited by: AndyDev on Nov 6, 2007 2:04 PM

  • List/Menu Form hides Main nav dropdown

    I've created an html page that when you scroll over the main
    nav bar at the top, the drop down, or 2nd level headers, drop down
    'behind' a list/menu form? Any ideas on how to fix this?

    There are only two options, since list/menus are "ACTIVE
    CONTENT" and
    therefore always rise to the top of the page since they are
    always being
    redrawn by the browser -
    1. Redesign the page so that you move the list/menu out of
    danger, or
    2. Create some custom js to hide the list/menu when that
    particular submenu
    opens
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Lerbekmo" <[email protected]> wrote in
    message
    news:enmi0u$2hs$[email protected]..
    > I've created an html page that when you scroll over the
    main nav bar at
    > the top, the drop down, or 2nd level headers, drop down
    'behind' a
    > list/menu form? Any ideas on how to fix this?
    >

  • PHP/Dreamweaver dynamic list menu

    I have a mySQL DB that has address listings on it, I have
    used the city column to populate a list menu dynamically w/ PHP...
    No problems so far- but I cannot figure out how to have each city
    listed only one time.
    In other words, say I have 20 of the same city listed on the
    DB column. I want each city to be listed once in the list menu....
    Any idea??? I have been thinking about it all day w/ out any
    luck!
    Thanks in advance,
    -B

    .oO(Steve)
    >On Wed, 7 Feb 2007 03:16:54 +0000 (UTC), "za beezo"
    ><[email protected]> wrote:
    >
    >> In other words, say I have 20 of the same city
    listed on the DB column. I want
    >>each city to be listed once in the list menu....
    >
    >SELECT DISTINCT instead of just SELECT
    Or a GROUP BY clause, which is what I usually prefer. But in
    this case
    it shouldn't matter.
    Micha

  • My form pages menu/list pull down items aren't legible in Firefox

    I'm using the form item - menu/list - set to menu.  It looks great in safari, but in firefox the list of items are scrunched together and not legible.  How can this be avoided or styled?

    Please when asking for help provide a link so that people can see the result and the code.  Otherwise it is just a big guessing game.
    Gary

Maybe you are looking for

  • Explain to me why I cannot use my iPhone & iPads Bluetooth with other phones & MacBooks

    So basically I want apple to explain to me in their logic why they have such a limitation with the Bluetooth on these devices. Earlier today, my partner connected her Nokia n8 to her MacBook Pro, it paired nicely with no errors or issues. So I decide

  • Authentication failed to....

    I have a strange problem with which I'm hoping someone can assist me. I have 8 clients running Leopard. These clients are all at different locations behind routers that use NAT to forward incoming traffic on the public static IP address to the privat

  • Assign string  to various fields of internal table

    hello, i have  one string : lt_str  TYPE STANDARD TABLE OF string. And there is one structure as: begin of ty_data field1 field2 field 3 end of ty_data. * table declaration: gt_data  TYPE STANDARD TABLE OF ty_data   WITH HEADER LINE. In old ECC we ha

  • Printing problem in prod order.

    Hello Guru, I have following problem. User release collective production orders (COHV) and then try to print on production order by t code "CO02". At that time system prints all released production orders. (Actually system should print only one produ

  • Linux Flash Player woes with hardware acceleration

    I am trying to get hardware accelerated Youtube video on my Ubuntu 10.04 box. There is nothing unusual about the hardware: Intel C2D, 945G chipset, and nVidia GT210 graphics. (also tried 9600GT and GT440 without success). The OS, nVidia driver, and l