I am trying to have a JavaScript form submit its data to a different email based on the drop down the user chooses.
Example:) [drop down list: IT / Sales / HR] If you chose IT it goes to IT@example.com, Choosing Sales from the drop down will make the form submit data to sales@example.com and so on.
I have seen a few php answers but I am limited by a content mangier system and must do this in JavaScript.
Any help would be great.
Forms do not “submit to an email” – you have to post it to the server, where you send the email via PHP (or some other server-side language). There is no direct way to email forms from javascript alone.
You simply must have a server-side script to handle the sending of the email. You mention having seen samples…. here’s another.
PHP (test.php)
HTML