Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2009
    Posts
    71
    Plugin Contributions
    0

    Default Contact Us Customization

    RE: Contact Us Page

    I installed the "add subject" mod to my contact us page. It added another input feild to type a subject in.

    I want to change the input feild into a drop-down menu where there will be 6 options to select.

    Can someone post the code needed?

    Is there more to it than replacing the code below found in tpl_contact_us_default.php?

    PHP Code:
    <label class="inputLabel" for="subject"><?php echo ENTRY_EMAIL_SUBJECT?></label>
    <?php echo zen_draw_input_field('subject'$subject' size="40" id="subject"') . '<span class="alert">' ENTRY_REQUIRED_SYMBOL '</span>'?>
    <br class="clearBoth" />

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

    Default Re: Contact Us Customization

    The code for the drop is mostly already contained in your tpl_contact_us_default.php file but also has a check for an admin setting.....This only gets you a dropdown,,,one must determine how it is to be populated with choices - - you probably will not need the test code highlighted
    And this "('send_to', $send_to_array, 0, 'id="send-to"')" will need to be recoded to be inline with your subject variables that were added with the other module
    Code:
    <?php
    // show dropdown if set
        if (CONTACT_US_LIST !=''){
    ?>
    <label class="inputLabel" for="send-to"><?php echo SEND_TO_TEXT; ?></label>
    <?php echo zen_draw_pull_down_menu('send_to',  $send_to_array, 0, 'id="send-to"') . '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'; ?>
    <br class="clearBoth" />
    <?php
        }
    ?>
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jan 2009
    Posts
    71
    Plugin Contributions
    0

    Default Re: Contact Us Customization

    Thank you for the reply! I follow you, but what is the easiest way to populate the drop-down with the choices??

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

    Default Re: Contact Us Customization

    Can google for many more but forms are mostly good old html

    http://www.echoecho.com/htmlforms11.htm
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Jan 2009
    Posts
    71
    Plugin Contributions
    0

    Default Re: Contact Us Customization

    Ok, so I customized the code to the following:

    PHP Code:
    <label class="inputLabel" for="subject"><?php echo ENTRY_EMAIL_SUBJECT?></label>
    <?php echo zen_draw_pull_down_menu('subject',  $subject0'id="subject"') . '<span class="alert">' ENTRY_REQUIRED_SYMBOL '</span>'?>
    <br class="clearBoth" />

    Now which file do I put the HTML drop down form you mentioned in your last message?

  6. #6
    Join Date
    Jan 2009
    Posts
    71
    Plugin Contributions
    0

    Default Re: Contact Us Customization

    This is what I came up with.... and I have less than 1 hour in total PHP experience. It seems to work so far.

    PHP Code:
    <label class="inputLabel" for="subject"><?php echo ENTRY_EMAIL_SUBJECT?></label>
    <?php
        
    echo "<select name=\"subject\" id=\"subject\">\n";
        
    $subjectArr = array();
        
    $subjectArr[] = "Shipping";
        
    $subjectArr[] = "Warranty";
        
    $subjectArr[] = "Feedback";
        
    $subjectArr[] = "Question";
        
    $subjectArr[] = "Other";
        foreach(
    $subjectArr as $v){
            if (
    $subject == $v) {
                echo 
    "<option value=\"$v\" selected=\"selected\">$v</option>\n";
            } else {
                echo 
    "<option value=\"$v\">$v</option>\n";
            }
        }
        echo 
    "</select>";
    ?>
    <br class="clearBoth" />

  7. #7
    Join Date
    Jan 2009
    Posts
    71
    Plugin Contributions
    0

    Default Re: Contact Us Customization

    found the fix
    Last edited by GoNinja; 2 Mar 2009 at 11:17 AM.

  8. #8
    Join Date
    Sep 2009
    Location
    Liverpool
    Posts
    96
    Plugin Contributions
    0

    Default Re: Contact Us Customization

    What was the code you edited as i'd like to have this function on my "Contact Us" page.

 

 

Similar Threads

  1. Replies: 3
    Last Post: 23 Oct 2015, 06:51 PM
  2. Contact us page with multiple contact choices?
    By plymgary1 in forum General Questions
    Replies: 1
    Last Post: 19 Aug 2009, 12:07 PM
  3. Contact US page + One more Contact FORM :blink:
    By Orange Wacko in forum Managing Customers and Orders
    Replies: 0
    Last Post: 21 Jul 2009, 10:29 PM
  4. Replies: 2
    Last Post: 13 Jul 2006, 11:25 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR