talon39
11-12-2003, 12:57 PM
Here's my situation. I need to make a form where each field gets emailed to a different set of recipients. My solution is to make each set of fields a seperate form with a seperate recipient tag, but have one submit button to submit all the forms. THis would create the illusion to the user that they are submitting one form, however all the right people get the correct fields emailed to them.
I tried the following:
<form name="Testform" action="http://website.com/cgi-sys/Form.cgi">
<input type=hidden name="recipient" value="email1@website.com">
<input type="text" name="textfield">
</form>
<form name="Secondform" action="http://website.com/cgi-sys/Form.cgi" onsubmit="document.Testform.submit(); return true;">
<input type=hidden name="recipient" value="email2@website.com">
<input type="text" name="textfield2">
<input type="submit">
</form>
However that only submits one form. Appearantly you can only submit one at a time in a single page unless there is some sort of action in between each. I thought maybe a single popup that updates after each form submits. However I wouldn't know how to code that. Does anyone know of a way to do what I'm trying to accomplish that works? Please post an example as my Javascript skills are pretty weak.
I tried the following:
<form name="Testform" action="http://website.com/cgi-sys/Form.cgi">
<input type=hidden name="recipient" value="email1@website.com">
<input type="text" name="textfield">
</form>
<form name="Secondform" action="http://website.com/cgi-sys/Form.cgi" onsubmit="document.Testform.submit(); return true;">
<input type=hidden name="recipient" value="email2@website.com">
<input type="text" name="textfield2">
<input type="submit">
</form>
However that only submits one form. Appearantly you can only submit one at a time in a single page unless there is some sort of action in between each. I thought maybe a single popup that updates after each form submits. However I wouldn't know how to code that. Does anyone know of a way to do what I'm trying to accomplish that works? Please post an example as my Javascript skills are pretty weak.