Solved

variable email addresses for frontpage form submission

Posted on 2003-10-30
7
295 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
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
chcp 65001 File encoding 66 266
Firewall vs WYSIWYG editor 5 81
Advice on what platform to use for a web app for AWS 3 103
Grunt No Clean Targets 6 181
Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
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…

789 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