Captcha and cfform preservedata
I've got a page with a captcha that was working fine. I enabled preservedata on the form and now the cfimage text attribute is not updating, apparently is preserving the data from the previous post. I need to preserve the user's data but not the cfimage. Anyone have this problem before?
Here's some code:
<cfset postPage = false>
<cfset errors = "">
<cfif isDefined("form.btnSubmit")>
<cfif hash(ucase(form.captcha)) neq form.captchaHash>
<cfset errors = errors & "The text you entered did not match the text in the box.<br />">
</cfif>
<cfif errors is "">
<cfset postPage = true>
</cfif>
</cfif>
<cfset captcha = makeRandomString()>
<cfset captchaHash = hash(captcha)>
<cfform name="form1" action = "#cgi.script_name#" method="post" preservedata="yes">
<cfimage action="captcha" width="285" height="75" text="#captcha#" fonts="arial,times roman,tahoma" >
<cfinput type="hidden" name="captchaHash" id="captchaHash" value="#captchaHash#">
<br>Enter the above text:
<cfinput name="captcha" type="text">
</cfform>
I ran a quick test of the code with CF8. For me, the image changes every time.
Similar Messages
-
SPam prevention in java mail using CAPTCHA and Obfuscation
im using struts,
i want to implement spam prevention using CAPTCHA and Obfuscation for
DOS or DDOS attack or unsolicited submissions through jsp forms submitted?
Suggest me some ideas or implementations for this
Thanks
RajeshHi,
Setting up GMail as IMAP will allow you to view your Spam folder. IMAP is the newer way of accessing mail so that would be the preferred way to go. IMAP enables you to keep everything in synch across multiple email clients.
The following link gives you more information on how to set things up and frequently asked questions:
http://mail.google.com/support/bin/answer.py?ctx=gmail&hl=en&answer=75725
Good luck! -
I am using Spry validation on some of my forms and noticed
that if I am using CFFORM, the validation works, but the form is
still allowed to submit if the validation fails. If I change the
cfform tags to regular form tags the validation works and the
submit is NOT allowed. I really need to use CFFORM. Does anyone
know what is happening here? Why is the form submitting even though
the spry validation failed. ???Can we use onsubmit for simple form.
Like below
<form action="index2.php" method="post" name="loginForm"
id="loginForm" style="clear: both;" onsubmit="return
Spry.Widget.Form.validate(this)">
<span id="username">
<input name="username" id="username" type="text"
class="inputbox" size="15" />
<span class="textfieldRequiredMsg"> Username
required</span>
</span>
<span id="password">
<input name="passwd" id="password" type="password"
class="inputbox" size="15" />
<span class="textfieldRequiredMsg">Password
required</span>
</span>
<a onClick="loginForm.submit();"> Login </a>
</form>
<script type="text/javascript">
<!--
//Text Field Vlidation
var username = new
Spry.Widget.ValidationTextField("username", "none", {minChars:1,
maxChars:200, validateOn:["blur"]});
var password = new
Spry.Widget.ValidationTextField("password", "none", {minChars:1,
maxChars:200, validateOn:["blur"]});
//-->
</script> -
CFDIV and CFFORM: Duplicating Text
Hi,
As I understand it, cfform within cfdiv should simply post back to the cfdiv. Here is the code I'm testing from CFDIVTest.cfm in CF9:
Outside Text
<cfdiv id="FormDiv">
<cfform name="GeneralForm" method="post">
Inside Text<br/>
<cfinput name="ButtonSubmit" type="submit" value="Submit">
</cfform>
</cfdiv>
When CFDIVTest.cfm first loads the output is as follows:
Outside Text
Inside Text
[Submit Button]
When I click the submit button the output is:
Outside Text
Outside Text
Inside Text
[Submit Button]
Repeated submits return the duplicated "Outside Text". Why is "Outside Text" being duplicated? Also, when I view the page source and do a find on "Outside Text" I only find it once, not twice.
Any thoughts?Welcome to the forums!
Masters can only have one "body" text box, which is why you can't copy/paste the text box on the master.
You can use a free text box placed on a master, but if it is not defined as a "text placeholder" it will not be selectable in the actual slide -- instead, such free text will simply put text onto a master that will then appear on all the slides using that master. If you want the text to be editable on each slide, select the free text box on the master, then in the Format menu, under the Advanced flyout menu, choose "Define as Text Placeholder". You will also likely want to go to the Text Inspector, and set the features of the text to appear in the box (for example, you may want it to expand down, rather than be centred in the box).
Depending on the functionality you want, you may also be able to get the desired effect by selecting the existing body text box, extending it across the width of the slide, and then in the Text Inspector, in the Columns panel, specify that it is to be 2 columns. -
Cflayout, cflayoutarea and cfform - can't use target _parent?
CF9 - I'm using a cflayoutarea within cflayout, then inside of that I have a cfform for login. When I submit my cfform it loads my login page (submitted) inside of the cflayout window, which I don't want. I've tried using target _blank, _parent, etc but it changes nothing. If I use plain old form instead of cfform with target _parent, it works fine. So does something within cfform clash with cflayout or cflayoutarea that I don't know about?
I'm bumping my own thread because I left this alone for awhile but want to revisit.
<cflayout name="articleManagement"...>
<cflayoutarea name="tabAdd" source="mysourcefile.cfm" title="blah">
<cfform action="myactionpage.cfm" method="post" name="mypage">
</cfform>
</cflayoutarea>
</cflayout>
cfform processes myactionpage.cfm and hits the cflocation at the end of the processing page, it loads mysourcefile.cfm back into my cflayout articleManagement which shows one form on top of the other. My cflocation should direct it to the main page that holds the cflayout.
Is there a way to break out of cflayout/cflayoutarea when using cfform? Using a regular form tag does not have this problem but I like using the cfform validation. -
Cfimage, captcha and partitions
Forgive me if I am overlooking something blindingly obvious,
but we are having a problem using the captcha attribute of cfimage
action. With our installation of CF8 running on a separate
partition from our web root, the folder where the image is created,
under tmpCache below the CF8 folder, is apparently unreachable by
the servlet (?). Has anyone run in to this? Is there a simple
mapping solution? Or an xml file containing a path to edit? Any
help or pointers would be greatly appreciated.
Thanks.May want to check your web server to be sure it's not Denying access to that folder based URL Request filtering. Part of the ColdFusion lockdown guide recommends to Deny access to this folder unless you use CFImage, CFChart, CFPresentation, or CFReport.
Page 30 here:
http://www.adobe.com/content/dam/Adobe/en/products/coldfusion/pdfs/cf11/cf11-lockdown-guid e.pdf -
Double trouble: email design and re Captcha
Hi,
I usually can do anything I need in Muse and now I hit a point where I don't know what to do. I got two problems and both are connected with Muse's email forms.
1) The design of the email I receive from my form.
I found the templates for the auto notification emails the form's sender receives after submitting the form and I was able to re-design the template. Now I want to re-design the email I receive from the form. Until now, I always get the Business Catalyst pre-styled email, two gray bars with the form's content in between. Since I am building the site for a customer and do not want to have them read the Business Catalyst "ads" in the mail, I would like to be able to re-design this email in the same style I did with the auto responder. Where can I do that?
2) Ever since I re-designed my auto-responder, re Captcha quit working. When I was using the form "as is" with Adobe's pre-formatted email templates, re Captcha worked fine. Now, with the changed auto responder template, I get the re Captcha error message every time I try to submit the form. I switched to BC Captcha and everything works fine, but I really want to use re Captcha.
Funny thing is: When submitting with re Captcha, the page itself disappears, I am redirected to my auto response email template where the re Captcha error message is displayed instead of the form's texts. I already trried reloading the re Captcha, the whole page, even quit and restarted my browser. As soon as I change the auto responder template, re Captcha does not work anymore.
Any help and ideas would be greatly appreciated!Hi Aish,
since it is a client's website, I cannot link it publicly yet. But I can paste the template code I inserted:
<style type="text/css">
.mail {
color: #0B3144;
font-family: Constantia, "Lucida Bright", "DejaVu Serif", Georgia, serif;
.logo {
vertical-align:top;
</style>
<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tbody>
<tr>
<td align="left" class="mail"><p><strong>Customer's Name</strong><br>
address
<p> </p></td>
<td align="right" class="logo"><img src="images/logo_email-01.png" width="250" height="75" alt=""/></td>
</tr>
</tbody>
</table>
<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tbody>
<tr>
<td class="mail">{tag_pagecontent}</td>
</tr>
</tbody>
</table>
I can't see anything that should disturb re-Captcha. Do you? -
More secure forms and CAPTCHA for non-BC sites?
Spam is ramping up...
Clients are unhappy.
When can we expect this issue to be addressed?
Loving Muse and Edge :)
Thanks!The short answers are:
There are no forms enhancements in the Q2 release. The Q2 release is currently in late Beta. Subscribers who can accept the terms of the Non-disclosure Agreement are invited to participate in the Beta program by going to museprerelease.com.
Addressing the need for CAPTCHA and/or similar technology for sites hosted on non-Adobe hosting is a high priority for the Q3 release of Muse.
We're not ignoring your pleas. The Q2 release marks the first release of work that started nearly 2 years ago. Completing the changes that are part of the Q2 release has required long hours and the full attention of the entire development team. We simply have not had the bandwidth to ponder anything else. We all look forward to that changing once the Q2 version of Muse is released.
Options for limiting or eliminating spam prior to the Q3 release of Muse include:
1) Verify your hosting includes a compatible version of SQL.
This will not elminate spam, but it does throttle the number of submissions a spammer can submit via your form. For your site go to http://<yoursiteurl.com>/scripts/form_check.php This URL will load a page that will report the status of the form processing on your site. Confirm there's a green checkmark next to SQL Configuration.
2) Use a third party forms service.
JotForms, WuFoo and Adobe Forms Central all provide very powerful services for creating and managing forms that require little or no knowledge of HTML coding. The forms created using one of these services can be pasted as an HTML object on a page in Muse.
3) Use a third party form processing library.
This solution requires some knowledge of coding. Products such as CoffeeCup software's forms solution can be used with Muse.
4) Host the site, or at least the form page, on Adobe Business Catalyst. -
Got a cfform with checkbox cfinputs they are looped about 4
boxes total. on page refresh all check boxes become selected
instead of just the couple I have selected.
Whats the fix for this?<cfform preservedata="yes">
<table cellpadding="0" cellspacing="0" border="0">
<cfloop from="1"
to="#ArrayLen(fieldOptions[url.pagesName].insertOptions)#"
index="i">
<cfoutput>
<cfswitch
expression="#fieldOptions[url.pagesName].insertOptions
.form#">
<cfcase value="location">
<cfset location =
ListToArray(fieldOptions[url.pagesName].insertOptions.field)>
<cfinvoke
component="cfc.articlePages"
method="getCountry"
returnvariable="getCountry">
</cfinvoke>
<cfinvoke
component="cfc.articlePages"
method="getState"
returnvariable="getState">
</cfinvoke>
<cfinvoke
component="cfc.articlePages"
method="getCity"
returnvariable="getCity">
</cfinvoke>
<tr><td id="articleTitleLayout">
<strong>#fieldOptions[url.pagesName].insertOptions
.title#</strong><br />
<span
id="alertRed">#fieldOptions[url.pagesName].insertOptions.hint#</span></td><td
id="articleLayout">
<table>
<tr><td>Country</td><td> <cfselect
name="#location[1]#" query="getCountry" display="country"
value="countryId" required="no" message="Must enter Country for
#fieldOptions[url.pagesName].insertOptions
.title#" class="form" queryPosition="below"><option
value=""
selected="selected">All</option></cfselect></td></tr>
<tr><td>State</td><td><cfselect
name="#location[2]#" query="getState" display="state"
value="stateId" required="no" message="Must enter State for
#fieldOptions[url.pagesName].insertOptions.title#" class="form"
queryPosition="below"><option value=""
selected="selected">All</option></cfselect></td><td></td></tr>
<tr><td>City</td><td><cfselect
name="#location[3]#" query="getCity" display="city" value="cityId"
required="no" message="Must enter city for
#fieldOptions[url.pagesName].insertOptions
.title# " class="form" queryPosition="below"><option
value=""
selected="selected">All</option></cfselect></td><td></td></tr>
<tr><td>
</table>
</td><tr>
</cfcase><cfcase value="checkBox">
<tr><td
id="articleTitleLayout"><strong>#fieldOptions[url.pagesName].insertOptions.title#</strong><br
/>
<span
id="alertRed">#fieldOptions[url.pagesName].insertOptions
.hint#</span></td><td id="articleLayout">
<cfinput type="checkbox"
name="#fieldOptions[url.pagesName].insertOptions.field#"
value="#fieldOptions[url.pagesName].insertOptions
.formOptions#" id="form"> All
<cfloop
list="#fieldOptions[url.pagesName].insertOptions.formOptions#"
delimiters="," index="list">
<cfinput type="checkbox"
name="#fieldOptions[url.pagesName].insertOptions
.field#" value="#list#" required="no" message="Must Select A
#fieldOptions[url.pagesName].insertOptions.title#"
id="form">#list#
</cfloop>
</td>
</tr>
</cfcase>
<cfcase value="radio">
<tr><td
id="articleTitleLayout"><strong>#fieldOptions[url.pagesName].insertOptions
.title#</strong><br />
<span
id="alertRed">#fieldOptions[url.pagesName].insertOptions.hint#</span></td><td
id="articleLayout">
<cfinput type="radio"
name="#fieldOptions[url.pagesName].insertOptions
.field#"
value="#fieldOptions[url.pagesName].insertOptions.formOptions#"
id="form"> All
<cfloop list="#fieldOptions[url.pagesName].insertOptions
.formOptions#" delimiters="," index="list">
<cfinput type="radio"
name="#fieldOptions[url.pagesName].insertOptions.field#"
value="#list#" required="no" message="Must Select A
#fieldOptions[url.pagesName].insertOptions
.title#" id="form">#list#
</cfloop>
</td></tr>
</cfcase>
</cfswitch>
</cfoutput>
</cfloop>
<tr><td
id='articleTitleLayout'><strong>Text
Search</strong></td><td
id='articleLayout'><cfinput type="text" name="searchText"
value="" required="no" message="Must Enter A Search Term" id="form"
></td>
<td><cfinput type="submit" name="submitFilterData"
value="Filter" id="form"></td></tr>
</table>
</cfform>
there it is radio,text,selects work just fine just the
checkboxes are retarded. Any advice would be grateful! -
Onload and Tabbing focus problem
I was asked by some of my users to set focus to the username
field on the login page when it loads. I began by adding to the
body tag and cfform tags OnLoad function. This allowed the page to
load and set up the user to just start typing without clicking in
the field. The problem is with trying to tab to the next field. The
only way I can even start tabbing to other fields is to click in
one and then depress the tab key. However, this only tabs over to
the other two fields while leaving out one of the fields.
I would like the page to load so that the user can start
typing and then by pressing tab he can move on to the next field. I
don't know why this code doesn't work. It is kind of frustrating.
Does anybody know of a fix to this problem?
Thank you for your time!Use a tabindex attribute in your form fields:
http://www.htmlgoodies.com/tutorials/forms/article.php/3479201
Tom Muck
co-author Dreamweaver MX 2004: The Complete Reference
http://www.tom-muck.com/
Cartweaver Development Team
http://www.cartweaver.com
Extending Knowledge Daily
http://www.communitymx.com/
"jedale" <[email protected]> wrote in
message
news:[email protected]...
I was asked by some of my users to set focus to the username
field on the
login
page when it loads. I began by adding to the body tag and
cfform tags
OnLoad
function. This allowed the page to load and set up the user
to just start
typing without clicking in the field. The problem is with
trying to tab to
the
next field. The only way I can even start tabbing to other
fields is to
click
in one and then depress the tab key. However, this only tabs
over to the
other
two fields while leaving out one of the fields.
I would like the page to load so that the user can start
typing and then by
pressing tab he can move on to the next field. I don't know
why this code
doesn't work. It is kind of frustrating. Does anybody know of
a fix to this
problem?
Thank you for your time!
<body onLoad="self.focus();document.login.focus()"
bgcolor="#F2F9FF">
<center>
<cfform format="flash" name="login" action="login.cfm"
method="post"
width="100%" height="100%" preservedata="true"
preloader="yes"
timeout="3600"
wmode="transparent" style="font-size:12px; font-weight:bold;
background-color:##F2F9FF; themeColor:##003366"
onload="name.setFocus();">
<cfformitem type="script">
function Tabit(){
if(Key.getCode() == Key.TAB){
password.setFocus()
</cfformitem>
<cfformgroup type="vbox"
style="horizontalAlign:'center';" id="mainbox">
<cfformgroup type="panel" id="loginPanel"
style="headerHeight:0;panelBorderStyle:'roundCorners';
shadowDistance:1;
background-color:##80A8D5; marginTop:0;" width="320"
height="80">
<cfformitem type="spacer" height="2" />
<cfinput width="200" maxlength="30" type="text"
name="name" label="Name"
style="font:Arial, Helvetica, sans-serif; font-size:12px;
font-weight:normal"
onKeyDown="Tabit();">
<cfinput width="200" maxlength="30" type="password"
name="password"
label="Password" style="font:Arial, Helvetica, sans-serif;
font-size:12px;font-weight:normal" >
</cfformgroup>
<cfformgroup type="vbox">
<cfformgroup type="horizontal"
style="horizontalAlign:'center';">
<cfinput type="button" name="logInButton" value="Log In"
onClick="alert('Submitted form');">
</cfformgroup>
</cfformgroup>
</cfformgroup>
</cfform>
</center>
</body> -
Hi
I want to add a captcha or image verfication to my contact form that I have used from the Muse widget library but I can't find the html code for this, what I can get is the html code for e-mail, captcha and submit? Can anyone help, thanksThanks Liam. I am a newbie at all of this and decided to use the widget contact form in muse which has an image verification module but when I test it I get a message that it has to be supported business catalyst captcha module so thought there was a html code for it.
Thanks for coming back to me so quickly -
I am having troubles creating a php captcha verifaction for a
form I am using.... I am able to create the catpcha fine but need
some help on the INSERT part of the form. This INSERT section
should input a record into a MySQL table providing the catpcha has
passed verification check.
The code I am using has two 'if' statements based on a pass
and fail... question I have is A) Should I use the if statements to
check the captcha and input the record B) How would I include a
INSERT within this function?
Many thanks
LukeCan you try this in your insert.php (its mysqli rather than mysql)
<?php
$NameofOrganization = $_GET['NameofOrganization'];
$Tickets = $_GET['Tickets'];
$OriginalPrice = $_GET['originalprice'];
$DiscountedPrice = $_GET['DiscountedPrice'];
$Date = $_GET['Date'];
$Time = $_GET['Time'];
$Email = $_GET['Email'];
$Description = $_GET['Description'];
$Event_name = $_GET['event_name'];
$con=mysqli_connect("localhost", "root" , "", "user_registration");
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
mysqli_query($con,"INSERT INTO events (name_organization, event_name, number_of_tickets, orginal_price, discounted_price, date, time, email,description) VALUES('$NameofOrganization' , '$Event_name', '$Tickets', ' $OriginalPrice', '$DiscountedPrice', '$Date', '$Time', '$Email', '$Description' )");
?>
Below is the mysql version for insert.php:
<?php
$NameofOrganization = $_GET['NameofOrganization'];
$Tickets = $_GET['Tickets'];
$OriginalPrice = $_GET['originalprice'];
$DiscountedPrice = $_GET['DiscountedPrice'];
$Date = $_GET['Date'];
$Time = $_GET['Time'];
$Email = $_GET['Email'];
$Description = $_GET['Description'];
$Event_name = $_GET['event_name'];
?>
<?php
// Make a MySQL Connection
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("user_registration") or die(mysql_error());
// Insert a row of information into the table "events"
mysql_query("INSERT INTO events
(name_organization, event_name, number_of_tickets, orginal_price, discounted_price, date, time, email,description) VALUES('$NameofOrganization' , '$Event_name', '$Tickets', ' $OriginalPrice', '$DiscountedPrice', '$Date', '$Time', '$Email', '$Description') ")
or die(mysql_error());
?> -
Forms without a CAPTCHA error message.
Has anyone received the below error? I don't want to use a CAPTCHA and have disabled it in the admin settings. Anyone know if I can at least stylize the error?
Multiple requests per IP address are rate-limited for forms without a CAPTCHA. Please contact the site owner or try again later.Nope and you wont see it that in the real world really. It is because your using the form multiple times in a short space of time from the same IP. That is a hard system message.
-
Using Captcha within a .php file form
Hello all - I need to add a captcha to an existing php form. The form is located in a .php file. I know this issue is not a Dreamweaver problem per se, but hoping someone here has had some experience with Captcha and .php files.
when I add the following to the <form>
require_once('recaptchalib.php');
$publickey = "your_public_key"; // you got this from the signup page
echo recaptcha_get_html($publickey);
I end up with a blank white page. Note: the public key has been added in my file.
There is a note in the tutorial that states:
<html>
<body> <!-- the body tag is required or the CAPTCHA may not show on some browsers -->
<!-- your HTML content -->
It is my understanding that <html> and <body> cannot/should not be added to .php pages. If this is true, can captcha work within a .php file?
Thanks in advance for any and all help.
GenegenoMU69 wrote:
Nancy - thanks.
What you're saying make sense.
When I added the code below:
require_once('recaptchalib.php');
$publickey = "your_public_key"; // you got this from the signup page
echo recaptcha_get_html($publickey);
to the form with my actual public key included
and:
<?php
require_once('recaptchalib.php');
$privatekey = "your_private_key";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
// What happens when the CAPTCHA was entered incorrectly
die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
"(reCAPTCHA said: " . $resp->error . ")");
} else {
// Your code here to handle a successful verification
?>
to the verify php, with the private key inserted,
I end up with a blank white page, the form dissapears. I thought maybe it was because the html and body tags were not included with the parent page (of which the form is a part of)
I will inbox you the parent form page so that you can see what I'm working with. Thanks again for you help.
G
At this stage I'd do a test.
Just include the form and captcha stuff in a page on its own and see what the results are. (obviously include the <body><html> tags.
If it works that means there is a problem with your real set up. If it doesnt it means there is certainly a problem with the way you have captcha set up. -
Hi, Please this is quite Urgent
I cannot seem to find an appropriate classic ASP captcha and formmail script
Could anyone reccommend?There is no need to get techical and ask what is appropriate. It is simple in my line of question
I need an asp form processor with a captcha script.
Does anyone know one?
hans-g. - this is php
Maybe you are looking for
-
how do i sort out error r6034 on my windows vista when i try to start itunes ??? the message box is from microsoft visual c++runtime library, it says an application has made an attempt to load the C runtime library incorrectly, P;ease contact the app
-
Header items not exporting to PDF in CS4
I am creating a checklist in In-design to be exported to a PDF for use on an IPAD. I have created a group of four boxes that I have made into buttons that are linked to individual pages to act as a navigation bar. This nav bar are on the top of eac
-
JDev 11.1.2.1, exact-match flag
JDev 11.1.2.1 I am trying to deploy my JDev/ADF application onto a Weblogic 10.3 Sun server. It complains about 'Unresolved Webapp Library references'. I found on the web that JDev 11.1.2.0 upgraded from jsf library 1.2 to 2.0 and that this can cause
-
Hi I have got my subsciption renewed on 23rd June, 2014. But I want to cancel the same. I didnot use any minutes from the subscription. Even I have been charged NZ $70 twice for the susbcritption. But I donot wish to continue with it. Another false p
-
Touchpad button LED stopped working on Satellite P series
I run the ccleaner 2.17 in the log function has stopped working and led to the play, stop, rewind ... " keys, between the two speakers. Can someone help me?