1
1 Just Jeff
Hi,
Win98
FP2000
In using forms to give on-line tests, I wanted to join 3 fields together to
serve as the subject of the e-mail being sent to me. I was given advice by
Jim Buyens and have tried to implement his suggestions - but I seem to be
missing something - it is more than likely my understanding. Here's is what
I would like:
Expectation: Test #1 PHY 221 I01 John Doe
I would like the following 3 items grouped together
title: Test #1 PHY 221
section number: I01
student name: John Doe
I would have the title (Test #1 PHY 221) already written within the form but
I need to the student to pick one of 3 sections numbers using radio buttons
(I01, I02, I03) and then enter their name in a text field.
All of this would be within a form which contains questions and problems.
Here's the present html with the questions and problems removed for space:
(also there is no subject field - but that is what I want to create).
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>fftest</title>
</head>
<form method="POST" name="FrontPage_Form1" action="--WEBBOT-SELF--"
onsubmit="return FrontPage_Form1_Validator(this)">
<!--webbot bot="SaveResults" U-File="fftest_data.html" S-Format="HTML/BR"
S-Label-Fields="TRUE" B-Reverse-Chronology="FALSE" S-Email-Format="HTML/BR"
[email protected] B-Email-Label-Fields="TRUE"
B-Email-ReplyTo-From-Field="TRUE" S-Email-ReplyTo="Email"
B-Email-Subject-From-Field="TRUE" S-Email-Subject="subject"
S-Date-Format="%A, %B %d, %Y" S-Time-Format="%I:%M:%S %p"
S-Builtin-Fields="Date Time" -->
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0">Test
#1 PHY 221</p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0">Section
Number</p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0"><input type="radio" value="I01" name="section">
I01 <input type="radio" value="I02" name="section"> I02 <input
type="radio" value="I03" name="section">
I03</p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0"> </p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0">Name</p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0"><input type="text" name="name" size="20"></p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0"> </p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0">E-mail</p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0"><input type="text" name="Email" size="20"></p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0"> </p>
<p align="center" style="word-spacing: 0; margin-top: 0; margin-bottom:
0"><font size="2"><input type="submit" value="Submit Test"></font></p>
</form>
</body>
</html>
Here's was Jim Buyens' suggestion (except then the section number was to be
a text field) which I never got to work...
========================================
Try this:
<form name="form1" method="POST">
<script>
function bldSubj(){
form1.subject.value = "Test #2 PHY 221" + " " +
form1.section.value + " " +
form1.stuname.value;
}
</script>
<p>Class Section:<br><input type="text" name="section"
size="20" onchange="bldSubj();"></p>
<p>Student Name:<br><input type="text" name="stuname"
size="20" onchange="bldSubj();"></p>
<p>Subject:<br><input type="text" name="subject"
size="50"></p>
<p><input type="submit" value="Submit"
name="btnSub"></p>
</form>
The onchange attributes on the section and stuname tags
cause the function bldSubj to run every time the visitor
updates those fields. The bldSubj function assembles the
subject line you want.
Once you get this working, you can change the subject tag
to a hidden form field, as in
<input type="hidden" name="subject">
Jim Buyens
Microsoft FrontPage MVP
-thanks,
Jeffrey
Win98
FP2000
In using forms to give on-line tests, I wanted to join 3 fields together to
serve as the subject of the e-mail being sent to me. I was given advice by
Jim Buyens and have tried to implement his suggestions - but I seem to be
missing something - it is more than likely my understanding. Here's is what
I would like:
Expectation: Test #1 PHY 221 I01 John Doe
I would like the following 3 items grouped together
title: Test #1 PHY 221
section number: I01
student name: John Doe
I would have the title (Test #1 PHY 221) already written within the form but
I need to the student to pick one of 3 sections numbers using radio buttons
(I01, I02, I03) and then enter their name in a text field.
All of this would be within a form which contains questions and problems.
Here's the present html with the questions and problems removed for space:
(also there is no subject field - but that is what I want to create).
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>fftest</title>
</head>
<form method="POST" name="FrontPage_Form1" action="--WEBBOT-SELF--"
onsubmit="return FrontPage_Form1_Validator(this)">
<!--webbot bot="SaveResults" U-File="fftest_data.html" S-Format="HTML/BR"
S-Label-Fields="TRUE" B-Reverse-Chronology="FALSE" S-Email-Format="HTML/BR"
[email protected] B-Email-Label-Fields="TRUE"
B-Email-ReplyTo-From-Field="TRUE" S-Email-ReplyTo="Email"
B-Email-Subject-From-Field="TRUE" S-Email-Subject="subject"
S-Date-Format="%A, %B %d, %Y" S-Time-Format="%I:%M:%S %p"
S-Builtin-Fields="Date Time" -->
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0">Test
#1 PHY 221</p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0">Section
Number</p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0"><input type="radio" value="I01" name="section">
I01 <input type="radio" value="I02" name="section"> I02 <input
type="radio" value="I03" name="section">
I03</p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0"> </p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0">Name</p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0"><input type="text" name="name" size="20"></p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0"> </p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0">E-mail</p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0"><input type="text" name="Email" size="20"></p>
<p align="left" style="word-spacing: 0; line-height: 100%; margin:
0"> </p>
<p align="center" style="word-spacing: 0; margin-top: 0; margin-bottom:
0"><font size="2"><input type="submit" value="Submit Test"></font></p>
</form>
</body>
</html>
Here's was Jim Buyens' suggestion (except then the section number was to be
a text field) which I never got to work...
========================================
Try this:
<form name="form1" method="POST">
<script>
function bldSubj(){
form1.subject.value = "Test #2 PHY 221" + " " +
form1.section.value + " " +
form1.stuname.value;
}
</script>
<p>Class Section:<br><input type="text" name="section"
size="20" onchange="bldSubj();"></p>
<p>Student Name:<br><input type="text" name="stuname"
size="20" onchange="bldSubj();"></p>
<p>Subject:<br><input type="text" name="subject"
size="50"></p>
<p><input type="submit" value="Submit"
name="btnSub"></p>
</form>
The onchange attributes on the section and stuname tags
cause the function bldSubj to run every time the visitor
updates those fields. The bldSubj function assembles the
subject line you want.
Once you get this working, you can change the subject tag
to a hidden form field, as in
<input type="hidden" name="subject">
Jim Buyens
Microsoft FrontPage MVP
-thanks,
Jeffrey