Solved

variable email addresses for frontpage form submission

Posted on 2003-10-30
7
298 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

 
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

Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

738 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