Solved

CFform and CFMail

Posted on 2002-07-29
8
341 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
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Hosting a website using port 443 SSL CA using Wampserver 2 How to: 6 53
Htaccess - if subdomain "dev." 2 78
connection string question 2 69
IIS 8.5 2 52
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

776 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