Connecting Tech Pros Worldwide Forums | Help | Site Map

Pass multiple email addresses to a hidden field in a form

james00_c@yahoo.com
Guest
 
Posts: n/a
#1: Jul 23 '05
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 webmaster@xyz.com 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="webmaster@xyz.com">

<!-- I would like "value" to end up with
"webmaster@xyz.com,document.fname.email.value" or
"webmaster@xyz.com,formuser@xyz.com". 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


RobG
Guest
 
Posts: n/a
#2: Jul 23 '05

re: Pass multiple email addresses to a hidden field in a form


james00_c@yahoo.com wrote:[color=blue]
> 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 webmaster@xyz.com 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="webmaster@xyz.com">[/color]

<form ... onsubmit="
this.sendto.value += ',' + this.email.value;
">
[color=blue]
>
> <!-- I would like "value" to end up with
> "webmaster@xyz.com,document.fname.email.value" or
> "webmaster@xyz.com,formuser@xyz.com". In other words both the
> webmaster and formuser should receive contents of the form. -->
>[/color]
[...]
[color=blue]
> <td width="63%"><input type="text" name="email"
> size="50"></td>
> </tr>
> </table>
>[/color]
[...]


--
Rob
Closed Thread