Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2007
    Location
    Sacramento, CA
    Posts
    64
    Plugin Contributions
    1

    Default Pulldown subject on Contact Us page throwing errors.

    Hi all...

    My pulldown "subject" mod is throwing errors when I try to use the contact us form.

    It denies the submit, and says, "Our system requires a minimum of 2 characters."

    Any ideas what I'm doing wrong?

    The code I'm using for the dropdown subject menu in the contact form is:

    Code:
    <label class="inputLabel" for="subject"><?php echo "Subject:"; ?>
    <div class="inputLabel"><select name="source"><option value="111"></option><option value="administrativematerial">Administrative Material</option><option value="121">CSI Directory</option><option value="454">Curriculum</option><option value="232">Magazine</option><option value="55">Online Courses</option><option value="6426">Other</option></div>
    <br class="clearBoth" />

  2. #2
    Join Date
    Sep 2004
    Posts
    1,388
    Plugin Contributions
    4

    Default Re: Pulldown subject on Contact Us page throwing errors.

    Your problem is here:
    Code:
    <option value="111"></option>
    You don't have anything between the <option> tags.
    Frank Koehl
    "Cleverly Disguised as a Responsible Adult"

    frankkoehl.com

  3. #3
    Join Date
    Aug 2006
    Posts
    254
    Plugin Contributions
    0

    Default Re: Pulldown subject on Contact Us page throwing errors.

    I've been working this too, really should say glomming since I just changed you great idea.

    Doesn't appear on my end that the suggestion of no value for that option fixed the problem and I continue to get the same 2 character minimum message.

    Did you solve your issue? If so and you have the time I would really appreciate some advice. This is a big hurdle for me going live.

    Thanks.

  4. #4
    Join Date
    Aug 2006
    Posts
    254
    Plugin Contributions
    0

    Default Re: Pulldown subject on Contact Us page throwing errors.

    Ok, I'm back and even though this solution is likely a super easy one if you have almost any PHP experience, as a newbie I had a lot of trouble tracking this down so I thought I would post it for others coming behind me.

    Of course you have to have the add_a_subject mod installed to get the subject to show at all.

    Once you've done that you will edit this file:
    /includes/templates/custom/templates/tpl_contact_us_default.php
    (isn't it nice to have the full path provided? Takes a while for us new guys to know where files are so the full path sure helps)

    Replace the subject (around line 75) with:

    <?php echo ($_POST['subject'])?>
    <select name="subject">
    <option value="">---------------------------Select a Subject from the List---------------------------</option>
    <option value="option1">option1 title to display</option>
    <option value="option2">option2 title to display</option>
    <option value="option3">option3 title to display</option>
    <option value="option4">option4 title to display</option>
    <option value="option5">option5 title to display</option>
    <option value="option6">option6 title to display</option>
    <option value="option7">option7 title to display</option>
    <option value="option8">option8 title to display</option>
    </select>
    <?php echo '<span class="alert">' . ENTRY_REQUIRED_SYMBOL . '</span>'?>
    <br /><br class="clearBoth" />

    Now you can keep a single email for your store and use your email filters to move the incoming messages anywhere you want based on the subject that this option puts into the email. I find it to not only be easier but also limits your exposure in terms of emails floating out there.

 

 

Similar Threads

  1. Google Base - Suddenly throwing errors
    By mr.chetanladdha in forum All Other Contributions/Addons
    Replies: 25
    Last Post: 22 Oct 2011, 06:40 PM
  2. Replies: 1
    Last Post: 8 Mar 2011, 01:36 AM
  3. Contact Us Subject
    By cs_jono in forum General Questions
    Replies: 5
    Last Post: 9 Nov 2007, 05:06 AM
  4. Add subject field to contact us
    By high2K in forum General Questions
    Replies: 0
    Last Post: 19 Jun 2007, 04:17 PM

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