Pass multiple email addresses to a hidden field in a form

J

james00_c

Greetings-

I need to pass multiple email addresses to a "sendto" hidden field in a
form. I need to do that because "CC" and "BCC" are not an option. One
address (e-mail address removed) would be hardcoded and another say
formuser@xyz would be a user input. A sample of my form looks like:

<table>
<tr>
<td width="100%"> <form name="fname" method="POST"
action="http://cgi_server/cgi-bin/mail.cgi">
<input type="hidden" name="sendto"
value="(e-mail address removed)">

<!-- I would like "value" to end up with
"(e-mail address removed),document.fname.email.value" or
"(e-mail address removed),[email protected]". In other words both the
webmaster and formuser should receive contents of the form. -->

<input type="hidden" name="subject" value="Request for
Program Information">
<input type="hidden" name="location"
value="thankyou.html">

<table border="0" width="99%">
<tr>
<td width="37%" valign="top"><p>E-mail
address:</p></td>
<td width="63%"><input type="text" name="email"
size="50"></td>
</tr>
</table>

<p align="center">
<input type="submit" value="Send Request" name="B0">
<input type="reset" value="Clear Form" name="B1">
</p>
</form></td>
</tr>
</table>


Please note that using the form user's Windows email client is not an
option. Thanks very much for any tips!

Regards,

James
 
R

RobG

Greetings-

I need to pass multiple email addresses to a "sendto" hidden field in a
form. I need to do that because "CC" and "BCC" are not an option. One
address (e-mail address removed) would be hardcoded and another say
formuser@xyz would be a user input. A sample of my form looks like:

<table>
<tr>
<td width="100%"> <form name="fname" method="POST"
action="http://cgi_server/cgi-bin/mail.cgi">
<input type="hidden" name="sendto"
value="(e-mail address removed)">

<form ... onsubmit="
this.sendto.value += ',' + this.email.value;
">
<!-- I would like "value" to end up with
"(e-mail address removed),document.fname.email.value" or
"(e-mail address removed),[email protected]". In other words both the
webmaster and formuser should receive contents of the form. -->
[...]

<td width="63%"><input type="text" name="email"
size="50"></td>
</tr>
</table>
[...]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top