I am trying to get a simple contact form to work so I get an email when the form is submitted. It works great, by the way. However, I can't get it to work with my dropdown menu. Everything else works, so I am not sure why the dropdown doesn't work. Here is the code:
(pretend I put the rest of the form code before and after the dropdown code)
Any help would be greatly appreciated on this problem. When I get the email, everything is filled in, except for the part where I am trying to get 'State'. Thank you very much in advanced!
There is a stray 'code' tag in the select that could be slopping it up , also, you will need to make sure "Trim" is not capitalized...it needs to be all lowercase.
But the actual issue is that you are not setting a value in the options...you should have something like this:
I am trying to get a simple contact form to work so I get an email when the form is submitted. It works great, by the way. However, I can't get it to work with my dropdown menu. Everything else works, so I am not sure why the dropdown doesn't work. Here is the code: (pretend I put the rest of the form code before and after the dropdown code)
and the php:
Any help would be greatly appreciated on this problem. When I get the email, everything is filled in, except for the part where I am trying to get 'State'. Thank you very much in advanced!
There is a stray 'code' tag in the select that could be slopping it up , also, you will need to make sure "Trim" is not capitalized...it needs to be all lowercase.
But the actual issue is that you are not setting a value in the options...you should have something like this:
http://jsfiddle.net/4DR6b/
Trim will work capitalised or not, but kgscott is on the money, should be kept as standard lower case.
Perfect. Works great. Thank you very much!
@andy_unleash yes, trim will work capitalized, but for convention sake (and mostly my sanity) it has to be all lower case! hahaha.