Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
jgaluska #1
Email form data AND post to a page
Newbie here...
Can anyone help me? I am able to email form data successfully via CFmail upon
submit. I am able to post the data to a page after submitting via CFoutput. But
how can I do BOTH, email the data and post to a page upon submit?
jgaluska Guest
-
redirect but with post data - mimick form post behaviour
Any thoughts on how to mimic result of submitting form data via POST Method? I have some code that sanitizes some submitted formfields and i'd like... -
Can a asp page post data to another asp page inside frameset?
I know this is probably easy but here is the details. I have an asp page that is not inside a frameset. I want to post data to another asp page... -
How to post some data in form of POST action of forms in asp?
Hi there, I need to post some information into an ASP page (mypage.asp), in form of POST action which I do with the following code: 'contents... -
#24013 [Com]: Missing Form Post Data
ID: 24013 Comment by: michael dot lindner at gmlindner dot de Reported By: webmaster at dtshowtime dot lu dot eu dot org... -
form data will not post
can anyone be so kind as to look at http://www.mysolution.ws/HYPOCRITE.php and let me know why it isn't passing the form data to ... -
mxstu #2
Re: Email form data AND post to a page
Originally posted by: jgaluska
I am able to post the data to a page after submitting via CFoutput. But how
can I do BOTH, email the data and post to a page upon submit?
Hi jgaluska,
It is unclear what you mean here by "submitting via CFoutput" and "post to a
page upon submit". You cannot submit a form using CFOUTPUT. Perhaps you mean
something else?
Are you trying to ..?
A) Have a user fill out a form
B) Submit the form information
C) Email the form information somewhere
D) Display a confirmation of the form information on the screen
... or something else?
mxstu Guest
-
jgaluska #3
Re: Email form data AND post to a page
A, B, C and D! That's exactly what I'm trying to do! I don't know how to make C
AND D both happen. I can email the information somewhere and I can display the
information but I need to do both.
Thank you for replying!]
jgaluska Guest
-
jgaluska #4
Re: Email form data AND post to a page
Hello mxstu,
I figured out something that works. It required three items:
1. an HTML form: theForm.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>The Form</title>
</head>
<body>
<form action = "theAction.cfm" method = "post" name="form" id="form">
<p>
Email Address:
<input name="ContactEmail" type="text" id="ContactEmail" />
</p>
<p>
Some Stuff:
<input type = "text" name = "value1">
</p>
<p> <input type = "submit" value = "Submit">
</p>
</form>
</body>
</html>
2. A CFOUTPUT of the form: theOutput.cfm
<title>The Output</title><table>
<tr>
<td width="260">
<CFOUTPUT>
<p>Email Address: #ContactEmail#</p>
<p>Some Stuff: #value1#
</p>
</CFOUTPUT>
</td>
</tr>
</table>
3. An action page to both display the output and email the form: theAction.cfm
<cfmail from="#form.ContactEmail#"
to="email@email.net"
subject="The Form"
server="mail.server.com"
type="HTML">
<cfinclude template="theOutput.cfm">
</cfmail>
<table>
<tr>
<td width="261">
<CFOUTPUT>
<p>Email Address: #ContactEmail#</p>
<p>Some Stuff: #value1#
</p>
</CFOUTPUT>
</td>
</tr>
</table>
This worked for me, but if you have any comments or a better way, I'd
appreciate hearing from you. If not, thank you again for responding.
Joe G
jgaluska Guest



Reply With Quote

