Zen Cart Logo
Forums / All Other Contributions/Addons / Pulldown subject on Contact Us page throwing errors.

Pulldown subject on Contact Us page throwing errors.

Locked

Views: 1,482

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
13 Mar 2007, 6:01 PM
#1
lukemcr avatar

lukemcr

New Zenner

Join Date:
Feb 2007
Location:
Sacramento, CA
Posts:
64
Plugin Contributions:
0

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:

<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" />
15 Mar 2007, 6:44 PM
#2
blindside avatar

blindside

Totally Zenned

Join Date:
Sep 2004
Posts:
1,237
Plugin Contributions:
1

Re: Pulldown subject on Contact Us page throwing errors.

Your problem is here:

<option value="111"></option>

You don't have anything between the <option> tags.

29 Mar 2007, 12:54 AM
#3
jeffey avatar

jeffey

Zen Follower

Join Date:
Aug 2006
Posts:
252
Plugin Contributions:
0

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.

13 Apr 2007, 1:45 AM
#4
jeffey avatar

jeffey

Zen Follower

Join Date:
Aug 2006
Posts:
252
Plugin Contributions:
0

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.