In answer to your comment about adding more jquery or javascript: Yes, you can include more, so long as you're careful not to overwrite global variables, etc. Here's what I recommend. You have:
<form method="post" action="mailto:...@email.com; ...@email.com" enctype="text/plain">
<select name="carlist" form="carform">
<option value="...@email.com">person1</option>
<option value="...@email.com">person2</option>
</select>
I would changes the <select>
to have an attribute, onChange
- this attribute will fire some action whenever the value of the dropdown changes - we'll give a javascript action like so:
<select name="carlist" form="carform" onChange="updateForm();" id="carlist">
I've given it an id
to make it easier to select in the javascript. We'll do the same to your <form>
tag here:
<form method="post" action="etc" enctype="text/plain" id="mainForm">
Then, right above your <form>
tag, I'd put the following <script>
tag:
<script type="text/javascript>
function updateForm(){
var email=document.getElementById("carlist").value;
document.getElementById("mainForm").action="mailto:"+email;
}
</script>
Then, any time the dropdown changes, the javascript will automatically update the <form action
to have a value of mailto: value of the dropdown
.
In the end, the block that started out:
<form method="post" action="mailto:...@email.com; ...@email.com" enctype="text/plain">
<select name="carlist" form="carform">
<option value="...@email.com">person1</option>
<option value="...@email.com">person2</option>
</select>
Will end:
<script type="text/javascript>
function updateForm(){
var email=document.getElementById("carlist").value;
document.getElementById("mainForm").action="mailto:"+email;
}
</script>
<form method="post" action="mailto:...@email.com; ...@email.com" enctype="text/plain" id="mainForm">
<select name="carlist" form="carform" onChange="updateForm();" id="carlist">
<option value="...@email.com">person1</option>
<option value="...@email.com">person2</option>
</select>