stellakebab
06-18-2007, 06:46 AM
All,
I'm using a formmail.cgi script and would like to have it setup so that when users submit there information, along with the information being sent to myself, it also sends the info back to the recipient using the email address that they have entered in the form.
I believe the code should be something like:
<input type="hidden" name="recipient" value="me@mydomain.com, this.form.Email.value();"
but for some reason, it doesn't work, have i got the code wrong, can anyone suggest what the code should be?
Code that i have is as follows:
<form action="http://mydomain.com/cgi-bin/formmail.cgi" method="post" name="requestform" onsubmit="return IsValidForm(this)">
<input type="hidden" name="recipient" value="me@mydomain.com">
<input type="hidden" name="subject" value="Request form">
<input type="hidden" name="redirect" value="/reply/request.htm">
<input type="hidden" name="email" value="company@mydomain.com">
<input type="hidden" name="realname" value="company@mydomain.com">
<input type="hidden" name="required" value="Email, Name">
<table border="0" cellspacing="0" cellpadding="0" width="90%" align="left">
<tr bgcolor="#FFFFFF">
<td>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td bgcolor="#6666CC"><img src="images/clear.gif" width="1" height="1"></td>
</tr>
</table>
<table border="0" cellspacing="1" cellpadding="7" width="100%">
<tr>
<td align="right" valign="top" width="202" bgcolor="#e3e3ff" class="headline7">Name</td>
<td colspan="5" bgcolor="#e3e3ff" class="headline7"><input size="45" name="Name" tabindex="1"></td>
</tr>
<tr>
<td align="right" valign="top" width="202" bgcolor="#e3e3ff" class="headline7">Department</td>
<td colspan="5" bgcolor="#e3e3ff" class="headline7"><input size="45" name="Department" tabindex="2"></td>
</tr>
<tr>
<td align="right" valign="top" width="202" bgcolor="#e3e3ff" class="headline7">Email</td>
<td colspan="5" bgcolor="#e3e3ff" class="headline7"><input size="45" name="EmailAddress" tabIndex="3"></td>
<tr>
<td align="right" valign="top" width="202" bgcolor="'#e3e3ff" class=headline7">Ext. Phone Number</td>
<td colspan="5" bgcolor="#e3e3ff" class="headline7"><input size="45" name="ExtTeleNumber" tabIndex="4"></td>
</tr>
<tr>
<td bgcolor="#E3E3FF" class="headline7"></td>
<td colspan="5" bgcolor="#E3E3FF" class="headline7">
<input type="submit" name="submit" value="Submit the Information" tabIndex="17"> <input type="reset" name="Reset" value="Reset all Values" tabIndex="18"></td>
</tr>
</table>
</td>
</tr>
</table>
I've left out some of the lines of code as these are business specific and I am unable to post these on the web. They are of no relevance to the problem that I am experiencing.
Can someone please help?
Donna
I'm using a formmail.cgi script and would like to have it setup so that when users submit there information, along with the information being sent to myself, it also sends the info back to the recipient using the email address that they have entered in the form.
I believe the code should be something like:
<input type="hidden" name="recipient" value="me@mydomain.com, this.form.Email.value();"
but for some reason, it doesn't work, have i got the code wrong, can anyone suggest what the code should be?
Code that i have is as follows:
<form action="http://mydomain.com/cgi-bin/formmail.cgi" method="post" name="requestform" onsubmit="return IsValidForm(this)">
<input type="hidden" name="recipient" value="me@mydomain.com">
<input type="hidden" name="subject" value="Request form">
<input type="hidden" name="redirect" value="/reply/request.htm">
<input type="hidden" name="email" value="company@mydomain.com">
<input type="hidden" name="realname" value="company@mydomain.com">
<input type="hidden" name="required" value="Email, Name">
<table border="0" cellspacing="0" cellpadding="0" width="90%" align="left">
<tr bgcolor="#FFFFFF">
<td>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td bgcolor="#6666CC"><img src="images/clear.gif" width="1" height="1"></td>
</tr>
</table>
<table border="0" cellspacing="1" cellpadding="7" width="100%">
<tr>
<td align="right" valign="top" width="202" bgcolor="#e3e3ff" class="headline7">Name</td>
<td colspan="5" bgcolor="#e3e3ff" class="headline7"><input size="45" name="Name" tabindex="1"></td>
</tr>
<tr>
<td align="right" valign="top" width="202" bgcolor="#e3e3ff" class="headline7">Department</td>
<td colspan="5" bgcolor="#e3e3ff" class="headline7"><input size="45" name="Department" tabindex="2"></td>
</tr>
<tr>
<td align="right" valign="top" width="202" bgcolor="#e3e3ff" class="headline7">Email</td>
<td colspan="5" bgcolor="#e3e3ff" class="headline7"><input size="45" name="EmailAddress" tabIndex="3"></td>
<tr>
<td align="right" valign="top" width="202" bgcolor="'#e3e3ff" class=headline7">Ext. Phone Number</td>
<td colspan="5" bgcolor="#e3e3ff" class="headline7"><input size="45" name="ExtTeleNumber" tabIndex="4"></td>
</tr>
<tr>
<td bgcolor="#E3E3FF" class="headline7"></td>
<td colspan="5" bgcolor="#E3E3FF" class="headline7">
<input type="submit" name="submit" value="Submit the Information" tabIndex="17"> <input type="reset" name="Reset" value="Reset all Values" tabIndex="18"></td>
</tr>
</table>
</td>
</tr>
</table>
I've left out some of the lines of code as these are business specific and I am unable to post these on the web. They are of no relevance to the problem that I am experiencing.
Can someone please help?
Donna