Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Feb 2007
    Location
    San Francisco, CA
    Posts
    16
    Plugin Contributions
    0

    Default dropdown menu on contact page

    I can't figure out how to create a dropdown menu on a new contact page I created. I am pretty well versed in XHTML and CSS but know very little about PHP and javascript. If anyone could help I would appreciate it
    Thanx


    Here is what I have so far:
    http://www.lawlessscarab.com/store/index.php?main_page=contact_retail

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: dropdown menu on contact page

    You did not specify what this is for??? There is code for a multiple # of contacts as a drop down present in includes/templates/template_default/templates/tpl_contact_us_default.php file (allways make a copy and place in your template overrides folder) - find this and you can copy - clone or code it as you need or if js or html wrap in php tags:
    Code:
    <?php
    // show dropdown if set
        if (CONTACT_US_LIST !=''){
    ?>
    But if this is what you want it is already there
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Feb 2007
    Location
    San Francisco, CA
    Posts
    16
    Plugin Contributions
    0

    Default Re: dropdown menu on contact page

    The dropdown is for a subject line. I have gotten as far as creating the dropdown list itself, I'm just not sure how to get the options in the dropdown menu to appear.

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: dropdown menu on contact page

    Try posting what you have added and where
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Feb 2007
    Location
    San Francisco, CA
    Posts
    16
    Plugin Contributions
    0

    Default Re: dropdown menu on contact page

    This is what I have done on a new page that I created using a template that I downloaded. The page is /includes/template/MY_TEMPLATE/templates/tpl_contact_retail_default.php

    Code:
    Code:
    <label class="inputLabel" for="inquiry_area"><?php echo ENTRY_INQUIRY_DROPDOWN; ?></label>
    <?php echo zen_draw_pull_down_menu('inquiry_area', $inquiry_area, ' size="40" id="inquiry_area"');?>
    <br class="clearBoth" />
    The problem is that on my site I get the dropdown menu but it is empty. I need to know how to fill it in with 4 different options; for example things like current order status or website problems and that's what I don't know how to put in. The example is on this link:

    contact retail

    The dropdown menu is next to area of inquiry: line of text.

    Thanx

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: dropdown menu on contact page

    You n eed to know that in almot all cases that the tpl file describes the display of information gathered from other files. You now have the page display ok but there is no data to draw from to populate this.

    You can inline code this data if it does not change or create another file to gather this info from the DB and make it dynamic if and when the data might be changed.

    You have to look at the code I referenced earlier for exactness but a general area would be tpl_contact_us_default.php and includes/modules/pages/contact_us/header_php.php

    Basic code for this would be the following but you need to apply a table where this info exists and the zen type of code that you find in the referenced files. also apply a name to the retreived data to be used in your tpl file
    Code:
    mysql_connect("localhost","root","password") or die (mysql_error()); // "root" is the default username.
    mysql_select_db("database") or die (mysql_error());
    $column = ""; // Set which column to be retrieved.
    $table = ""; // Set which table to retrieve column from.
    $query="SELECT $column FROM $table";
    $result = mysql_query($query);
    // echo the select tag:
    echo "<select name=\"bla\">";
    // Lets loop through the result:
    while($row = mysql_fetch_array($result)) {
      echo "<option value=\"$row\">$row</option><br/>\r\n";
    }
    // echo the closure of the select tag:
    echo "</select>";
    Zen-Venom Get Bitten

 

 

Similar Threads

  1. v155 Contact us dropdown menu not working properly
    By spminis in forum Basic Configuration
    Replies: 16
    Last Post: 20 Aug 2016, 10:34 PM
  2. v150 No dropdown on contact us page?
    By SquareDorito in forum Basic Configuration
    Replies: 2
    Last Post: 8 Mar 2013, 12:56 AM
  3. v150 Adding ez-page links to a dropdown menu
    By lEWISm in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 28 Aug 2012, 11:25 PM
  4. How can I add a Country dropdown to my contact-us page?
    By dw08gm in forum General Questions
    Replies: 0
    Last Post: 18 Oct 2009, 06:33 PM
  5. Header Dropdown Menu (CSS) Without the Dropdown???
    By hcd888 in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 27 May 2009, 01:20 AM

Posting Permissions

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