Subject Line of Email Form

M

MM

Hello,
I have created a very simple form which allows users to submit information
by answering questions.
Once the user clicks on Submit the data is sent to an email address, all
this is working OK. I have also managed to customise it so that the Subject
of email is the Full name of the person that submitted the form. i.e.
whatever was entered in the Fullname field of the form.
The question is can i customise it further so that the subject line of the
email reads "Incident via Email" - FullName. e.g. Incident via Email - John
Smith.
Please adivse.

Regards

MM
 
S

Stefan B Rusynko

Add a hidden field for the "prefix" text after your fullname field
<input type="text" name="fullname" size="20" value="" >
<input type="hidden" name="prefix" value="Incident via Email - ">

And another one empty one for your subject field (used in your form properties)
<input type="hidden" name="subject" value="">

Then add an onsubmit script to concatenate them to the form tag
<form ....... onSubmit="this.subject.value=this.prefix.value+this.fullname.value;">

PS
- the onsubmit will only work if you are not using FP form field validation

If using FP form field validation try adding an onblur event to your Fullname field
<input type="hidden" name="prefix" value="Incident via Email - ">
<input type="hidden" name="subject" value="">
<input type="text" name="fullname" size="20" value=""
onBlur="this.form(0).subject.value=this.form(0).prefix.value+this.fullname.value;">


All above tags must be on one line w/o wrapping
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Hello,
| I have created a very simple form which allows users to submit information
| by answering questions.
| Once the user clicks on Submit the data is sent to an email address, all
| this is working OK. I have also managed to customise it so that the Subject
| of email is the Full name of the person that submitted the form. i.e.
| whatever was entered in the Fullname field of the form.
| The question is can i customise it further so that the subject line of the
| email reads "Incident via Email" - FullName. e.g. Incident via Email - John
| Smith.
| Please adivse.
|
| Regards
|
| MM
 

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