I have a form that uses POST to send the info to me. In the form, I have a drop down menu. I also have sub-menus that are visible or not based on which option is selected. For the sake of these sub-menus, I had to put a value to each option on the list so that I could use JS.
So here is the question: Is it possible to find a work around so that when the email is sent, the subject contains the item in the menu instead of its value and still be able to use the JS code? I tried to use the id attribute on the options instead of value, but then the JS doesn't work. At first I thought it was the PHP and i posted there, but I think I need help with the JS part, since the PHP seems to fine.
Let me also note, that the code is otherwise working fine, so I only took out small portions for examples, I just want to get the subject part to look better for the sake of replies. Thank you so much in advance!!!
Here is the html for the list:
<select id="subject" name="subject" size="1">
<option value="gen">General Question/Comment</option>
<option value="video">Request an Audio/Video Quote</option>
<option value="comp">Computer Service</option>
<option value="mmserv">Multimedia Service</option>
<option value ="foren">Forensic Service</option>
here is the JS:
var val = $(this).val();
var hide = (val == 'gen') ? false : true;
(hide == true) ? $('p#general').slideUp('slow') : $('p#general').slideDown('slow');
here is the php:
$msg = " Name: $name\
"Operating System: $opsys\
"How did you hear about us?: $hear\
"Promo Code: $promo\
"Join mailing list: $mailing\