Solved

CFform and CFMail

Posted on 2002-07-29
8
347 Views
Last Modified: 2013-12-24
I would like to include CFFORM tags within CFMAIL tags.  When the mail recipient receives the email he is asked to complete a small form and submit. These 3 fields populate a table in a database.

Is this possible? My code is as follows:


<CFMAIL TO="xxx"  
     FROM="yyy"
     SUBJECT="zzz
        type="HTML"
        server=?????>

<CFFORM  NAME="FORM" ACTION="email_response.cfm" METHOD="POST" >
     <TABLE>
     <TR><TD>Email Address&nbsp;&nbsp;&nbsp;<INPUT TYPE="text" NAME="EMAIL_ADDR" SIZE=20></TD>
     <TD>Yes&nbsp;&nbsp;&nbsp;<CFINPUT TYPE="Radio"  VALUE="Yes" NAME="DECISION"></TD>
     <TD>No&nbsp;&nbsp;&nbsp;<CFINPUT TYPE="Radio"  VALUE="No" NAME="DECISION"></TD>
     <TD><INPUT TYPE="hidden" NAME="INVOICE_NBR" VALUE=#Form.INVOICE_NBR#  SIZE=20></TD>
     
     </TR>
     <TR>
     <TD><INPUT TYPE="Image"  SRC="travel/images/submit.gif"  NAME="Submit"  ALIGN="right" BORDER="0"></TD>
     </TR>
     </TABLE>
</CFFORM>
</CFMAIL>



email_response.cfm:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<HTML>
<HEAD>
     <TITLE>Travel Application Approval Submittal</TITLE>
</HEAD>

<BODY>

 
<CFQUERY NAME="QAPPROVALS" DATASOURCE="#db#" >
INSERT into TBL_APPROVALS
VALUES('#Form.INVOICE_NBR#','#Form.EMAIL_ADDR#','#Form.DECISION#')

</CFQUERY>



</BODY>
</HTML>
0
Comment
Question by:CTerreri
[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
8 Comments
 
LVL 5

Expert Comment

by:CFXPERT
ID: 7185994
Not sure if that'll work.  Have you tried it yet and if so what happens?  Also what errors do you get?
0
 
LVL 5

Expert Comment

by:CFXPERT
ID: 7186003
Also you might  not want it done like this becasue not all email boxes will show HTML in the preview window.  Also alot of users have this feature disabled.  I would put a link on the email to the form running on your server and handle it that way.  Of course your idea would be cool but not very practical  I think.
0
 
LVL 17

Accepted Solution

by:
anandkp earned 300 total points
ID: 7187162
HI there,

Yes what ur trying to do is definately possible.

but u got to keep one thing in mind - before going ahead with this. [All ur mail recipients should be able to recieve HTML mails.]

if u r sure abt this ... go ahead with this - it shoudnt be a problem - as ive myself done this many a times ...

so be cool !!!

K'Rgds
Anand
0
Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

 
LVL 5

Expert Comment

by:CFXPERT
ID: 7192395
Exactly my comment above.  I respectively offer my suggestions as an answer to your question.

KWK
0
 
LVL 5

Expert Comment

by:CFXPERT
ID: 7247499
Hi CTerreri

Any luck here on this?
0
 

Author Comment

by:CTerreri
ID: 8092223
I know its been a while since this question was last addressed but I would like to reopen if anyone's interested.

My latest input on this is that I tried to implement the cfform tag within cfmail but when I hit submit ...nothing happens.  The email is no longer generated once I add the cfform code in.

Can anyone explain why this is happening?

P.S.  Please note the increase in points.
0
 
LVL 10

Expert Comment

by:substand
ID: 9134915
do you still need help on this?
0
 

Author Comment

by:CTerreri
ID: 9141224
It took me a long time to get this to work but it finally did.  I had some html problems that I had to resolve before I could get this to work.

Thanks to all
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

707 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