Solved

variable email addresses for frontpage form submission

Posted on 2003-10-30
7
289 Views
Last Modified: 2013-12-24
Is it possible to set the destination of form results based upon the content of a formfield (i.e. drop down box?)

I am setting up a holiday request form for our department and would prefer not to have to create multiple versions of the form; however, the results need to be routed via email to the individuals immediate line manager; therefore, the destination will vary depending upon the line manager selected from a drop down box.  Is this possible? Is there any javascript which would enable this functionality?  
0
Comment
Question by:uk_doctorj
  • 4
  • 2
7 Comments
 
LVL 31

Accepted Solution

by:
seanpowell earned 25 total points
ID: 9650259
You won't be able to do this using FP's built-in Form Handler to modify the email action of the form.
You'll need to use some other type of form processing script (JMail, CDONTS, etc.) depending on what your server supports.

Either way, the new form script will include something like:

<select size="1" name="recipient">
  <option value="larry@3stooges.com">Larry</option>
  <option value="moe@3stooges.com">Moe</option>
  <option value="curly@3stooges.com">Curly</option>
</select>
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9650729
Do you need more info here - I'm just curious why the grade of B?
0
 

Author Comment

by:uk_doctorj
ID: 9651178
No George, that's very helpful.  I will need a bit more assistance, but that's due to my limitations (i.e., still quite new to FrontPage and web developing, but learning by the day), not the shortcomings of your response. I will discuss with some of my IT colleauges to use your advice to the best effect.  Apologies for the grade of B.  This is all a bit new to me, and I didn't realise a grade of B would be viewed as less than satisfactory.
Thanks very much for the prompt response. Much appreciated.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 31

Expert Comment

by:seanpowell
ID: 9651474
That's fine - I just want to make sure that you're going in the right direction. Usually it's a good idea to leave the Question open so we can go back and forth to make sure everything is okay. Personally I'm not concerned with how many points a qeustion is worth (because they really have no value and I do this work for free to try and help out others...) I was just concerned that my initial response left you wanting...

Thanks,
GM
0
 

Author Comment

by:uk_doctorj
ID: 9651567
Thanks for the hint to leave future questions open GM.  I've managed to get a demo form handler running based on your suggestion and something one of our IT team previously used, but am now trying to format the results a bit better (i.e., the email it sends doesn't actually indicate what the input fields being submitted refer to - it simply sends the content).  I think I'm going to have a search about for a better form handler (JMail, CDONTs - as you've suggested).  At least I'm making progres.

Thanks again.
j
0
 

Expert Comment

by:liina
ID: 9745936
<Is it possible to set the destination of form results based upon the content of a formfield (i.e. drop down box?)>

Hi, question about that I want Form results to variable email.
I did the drop-down menu and "Send" / "Reset" buttons, but I can't get the results :(

When I press "Send" I get some kind of error - Cannot run the FrontPage Server Extensions' Smart HTML interpreter on this non-HTML page: "***"

I have something like this (copy-paste with some changes from http://www.timeforweb.com/frontpage/forum_posts.asp?TID=518&PN=5):

<FORM NAME="mailer" METHOD="post" ACTION="" ENCTYPE="text/plain"
onSubmit="(document.mailer.action += mailtoandsubject)">

<!-- Original: Jeff Kieke -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<TABLE BORDER=0>
<TR VALIGN="top">
<TD>Recipient:</TD>
<TD><SELECT NAME="mailtoperson" onChange="msg(this.form)">
<OPTION VALUE="">-- Vali --
<OPTION VALUE="liina.jogisu@mail.ee">Liina mail.ee
<OPTION VALUE="liina_j@yahoo.com">Liina yahoo.com
</SELECT></TD>
</TR>
<TR>
<TD> </TD>
<TD><INPUT TYPE="submit" VALUE="Send" style="font-family: verdana; font-size: 10pt" name="Send">
<INPUT TYPE="reset" VALUE="Reset" name="Reset"></TD>
</TR>
</TABLE>
</FORM>

<SCRIPT LANGUAGE="JavaScript">
function msg() {
document.mailer.action = "mailto:"
mailtoandsubject = ((document.mailer.mailtoperson.options[document.mailer.mailtoperson.selectedIndex].value) + '?subject=' + document.mailer.subject.value);
}

</SCRIPT>
0
 
LVL 31

Expert Comment

by:seanpowell
ID: 9747206
Sorry liina - can you post a new question for this?
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now