multiple form fields = subject line

J

Jack

I have a form that I would like to have emailed to me. I
want to have the subject line based on 2 form fields that
have been filled out by the client.

I read a previous post explaining how to do this with
hidden inputs and using the onclick command. Below is a
copy of the post I copied:

In the form, right click | Form Properties | Advanced |
Add | Name the field (say: thesubject) and give it a
value, then create one for the "rest" of the subject
(say: rest).

To do the concatenation in the submit button add an
onclick event handler
onclick="this.form.thesubject.value =
this.form.subject.value + " " +
this.form.rest.value;return true;" So if subject =
Complaint and if rest = From Web then thesubject will =
Complaint From Web when the submit button is clicked. Now
use thesubject as your field name in Form Properties
Options

I have followed the instructions only to have the email
sent to me with the subject being whatever value I
originally set for 'thesubject'

I have included the 'test' code to see if I can get it to
work. I continue to get the same negative results (email
sent to me with subject line 2)

Any help would be greatly appreciated.
Thanks,
Jack

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<title>Tell us what you think about our web site</title>
</head>

<body>

<p>Tell us what you think about our web site, our
products, our organization, or
anything else that comes to mind. We welcome all of your
comments and
suggestions.</p>
<form method="POST" action="--WEBBOT-SELF--" name="this">
<!--webbot bot="SaveResults" u-
file="_private/feedback.txt" s-format="TEXT/TSV" s-label-
fields="TRUE" b-reverse-chronology="FALSE" s-email-
format="TEXT/PRE" s-email-address="test.com" b-email-
label-fields="TRUE" b-email-subject-from-field="TRUE" s-
email-subject="thesubject" s-date-format="%d %b %Y" s-
time-format="%H:%M:%S" s-builtin-fields="REMOTE_NAME
REMOTE_USER HTTP_USER_AGENT Date Time" -->
<p><strong>What kind of comment would you like to send?
</strong></p>
<dl>
<dd><input type="radio" name="MessageType"
value="Complaint">Complaint
<input type="radio" name="MessageType"
value="Problem">Problem
<input type="radio" checked name="MessageType"
value="Suggestion">Suggestion
<input type="radio" name="MessageType"
value="Praise">Praise</dd>
</dl>
<p><strong>What about us do you want to comment on?
</strong></p>
<dl>
<dd><select name="subject" size="1">
<option selected>Web Site</option>
<option>Company</option>
<option>Products</option>
<option>Store</option>
<option>Employee</option>
<option>(Other)</option>
</select> Other:
<input type="text" size="26" maxlength="256"
name="rest"></dd>
</dl>
<p><strong>Enter your comments in the space provided
below:</strong></p>
<dl>
<dd><textarea name="Comments" rows="5"
cols="42"></textarea></dd>
</dl>
<p><strong>Tell us how to get in touch with
you:</strong></p>
<dl>
<dd>
<table>
<tr>
<td>Name</td>
<td><input type="text" size="35" maxlength="256"
name="Username"></td>
</tr>
<tr>
<td>E-mail</td>
<td><input type="text" size="35" maxlength="256"
name="UserEmail"></td>
</tr>
<tr>
<td>Tel</td>
<td><input type="text" size="35" maxlength="256"
name="UserTel"></td>
</tr>
<tr>
<td>FAX</td>
<td><input type="text" size="35" maxlength="256"
name="UserFAX"></td>
</tr>
</table>
</dd>
</dl>
<dl>
<dd><input type="checkbox" name="ContactRequested"
value="ContactRequested">
Please contact me as soon as possible regarding this
matter.</dd>
</dl>
<p><input type="submit"
onclick="this.form.thesubject.value =
this.form.subject.value + " " +
this.form.rest.value;return true;" value="Submit
Comments">

<input type="reset" value="Clear Form"></p>
<input type="hidden" name="rest" value="1">
<input type="hidden" name="thesubject" value="2">
</form>
<hr>
<h5>Author information goes here.<br>
Copyright © 2001 [OrganizationName]. All rights
reserved.<br>
Revised: <!--webbot bot="TimeStamp" s-type="EDITED" s-
format="%m/%d/%y" -->.</h5>

</body>

</html>
 
J

Jim Buyens

You have two form fields named "rest". Get rid of one, probably:

<input type="hidden" name="rest" value="1">

Jim Buyens
Microsoft FrontPage MVP
(e-mail address removed)
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*


I have a form that I would like to have emailed to me. I
want to have the subject line based on 2 form fields that
have been filled out by the client.

I read a previous post explaining how to do this with
hidden inputs and using the onclick command. Below is a
copy of the post I copied:

In the form, right click | Form Properties | Advanced |
Add | Name the field (say: thesubject) and give it a
value, then create one for the "rest" of the subject
(say: rest).

To do the concatenation in the submit button add an
onclick event handler
onclick="this.form.thesubject.value =
this.form.subject.value + " " +
this.form.rest.value;return true;" So if subject =
Complaint and if rest = From Web then thesubject will =
Complaint From Web when the submit button is clicked. Now
use thesubject as your field name in Form Properties
Options

I have followed the instructions only to have the email
sent to me with the subject being whatever value I
originally set for 'thesubject'

I have included the 'test' code to see if I can get it to
work. I continue to get the same negative results (email
sent to me with subject line 2)

Any help would be greatly appreciated.
Thanks,
Jack

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<title>Tell us what you think about our web site</title>
</head>

<body>

<p>Tell us what you think about our web site, our
products, our organization, or
anything else that comes to mind. We welcome all of your
comments and
suggestions.</p>
<form method="POST" action="--WEBBOT-SELF--" name="this">
<!--webbot bot="SaveResults" u-
file="_private/feedback.txt" s-format="TEXT/TSV" s-label-
fields="TRUE" b-reverse-chronology="FALSE" s-email-
format="TEXT/PRE" s-email-address="test.com" b-email-
label-fields="TRUE" b-email-subject-from-field="TRUE" s-
email-subject="thesubject" s-date-format="%d %b %Y" s-
time-format="%H:%M:%S" s-builtin-fields="REMOTE_NAME
REMOTE_USER HTTP_USER_AGENT Date Time" -->
<p><strong>What kind of comment would you like to send?
</strong></p>
<dl>
<dd><input type="radio" name="MessageType"
value="Complaint">Complaint
<input type="radio" name="MessageType"
value="Problem">Problem
<input type="radio" checked name="MessageType"
value="Suggestion">Suggestion
<input type="radio" name="MessageType"
value="Praise">Praise</dd>
</dl>
<p><strong>What about us do you want to comment on?
</strong></p>
<dl>
<dd><select name="subject" size="1">
<option selected>Web Site</option>
<option>Company</option>
<option>Products</option>
<option>Store</option>
<option>Employee</option>
<option>(Other)</option>
</select> Other:
<input type="text" size="26" maxlength="256"
name="rest"></dd>
</dl>
<p><strong>Enter your comments in the space provided
below:</strong></p>
<dl>
<dd><textarea name="Comments" rows="5"
cols="42"></textarea></dd>
</dl>
<p><strong>Tell us how to get in touch with
you:</strong></p>
<dl>
<dd>
<table>
<tr>
<td>Name</td>
<td><input type="text" size="35" maxlength="256"
name="Username"></td>
</tr>
<tr>
<td>E-mail</td>
<td><input type="text" size="35" maxlength="256"
name="UserEmail"></td>
</tr>
<tr>
<td>Tel</td>
<td><input type="text" size="35" maxlength="256"
name="UserTel"></td>
</tr>
<tr>
<td>FAX</td>
<td><input type="text" size="35" maxlength="256"
name="UserFAX"></td>
</tr>
</table>
</dd>
</dl>
<dl>
<dd><input type="checkbox" name="ContactRequested"
value="ContactRequested">
Please contact me as soon as possible regarding this
matter.</dd>
</dl>
<p><input type="submit"
onclick="this.form.thesubject.value =
this.form.subject.value + " " +
this.form.rest.value;return true;" value="Submit
Comments">

<input type="reset" value="Clear Form"></p>
<input type="hidden" name="rest" value="1">
<input type="hidden" name="thesubject" value="2">
</form>
<hr>
<h5>Author information goes here.<br>
Copyright © 2001 [OrganizationName]. All rights
reserved.<br>
Revised: <!--webbot bot="TimeStamp" s-type="EDITED" s-
format="%m/%d/%y" -->.</h5>

</body>

</html>
 

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

Top