?
Solved

CFform and CFMail

Posted on 2002-07-29
8
Medium Priority
?
349 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 900 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
Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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 …
Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month8 days, 16 hours left to enroll

765 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