close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

CAPTCHA field causing Insert Record to not occur

Thread began 2/01/2011 11:31 pm by holt3937911 | Last modified 2/03/2011 10:00 am by Jason Byrnes | 766 views | 3 replies |

holt3937911

CAPTCHA field causing Insert Record to not occur

I'm able to create a simple form...and use an Insert Record server behavior to add a record to my database. However when I include a CAPTCHA field using the FB and use Server Validation that is automatically setup for me by FB, the Insert Record no longer works.

It may be my CAPTCHA code. If I purposely type in the CAPTCHA security code that doesn't match the image...I don’t get any error messages stating it wrong…Nor is the Failed Redirect URL invoked (as defined in the Server Validation).

If I type in the security code correctly.....my record Insert doesn’t occur as expected.

I’m a little suspicious of how the WA Server Validation code looks as there doesn’t appear to be anything in it about verifying the Security Code field. I've tried setting up a Server Validation specifically for the Security Code using "Like Entry" with Server variable from WA Server Validation Entries (Security Coder) with the Security Code field in my form...but not been very successful in getting Server Validation to work for the Security Code field or the the Insert Record server behavior.

Any suggestions.

Attached Files
emailformTest2.php.zip
Sign in to reply to this post

Jason ByrnesWebAssist

When adding the captcha validation, dont use the WA Server Validation Entries (Security Code) variable, this is created only when the validation fails.

Use the Security Code binding under the Form binding group, and set it to compare to the captcha_Security_Code session variable.

Sign in to reply to this post

holt3937911

Noticed Different Form Field Definitions

First...THANKS!

OKay......I recreated the entire page from scratch.....as I didn't see a session variable. Once I had the new page posted....it all works as expected.

On more than one occasion....I noticed that the form field definitions are created differently (e.g. us of ValidatedField("NewTestPage","Full_Name"):"")) ..but I have never been able to figure out what I've done differently. Below is an example of a form field that is working with CAPTCHA and Server Validation. This form was created initially with CAPTCHA field in the form.

<div class="fullColumnGroup">
<label for="Full_Name" class="sublabel" > Name<span class="requiredIndicator">&nbsp;*</span></label>
<div class="errorGroup">
<div class="fieldPair">
<div class="fieldGroup"> <span id="Full_Name_Spry">
<input id="Full_Name" name="Full_Name" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("NewTestPage","Full_Name"):"")); ?>" class="formTextfield_Large" tabindex="1" onblur="hideServerError('Full_Name_ServerError');"/>
<span class="textfieldRequiredMsg">Please enter your name</span> </span>
<?php
if (ValidatedField('NewTestPage','NewTestPage')) {
if ((strpos((",".ValidatedField("NewTestPage","NewTestPage").","), "," . "1" . ",") !== false || "1" == "")) {
if (!(false)) {
?>
<span class="serverInvalidState" id="Full_Name_ServerError">Please enter your name</span>
<?php //WAFV_Conditional NewTestPage.php NewTestPage(1:)
}
}
}?>
</div>
</div>
</div>


This is an example of form field when the page wasn't working where I created the form...saved it..then added the CAPTCHA field......any idea what I may be doing to cause the code below to be generated....other than what I just stated. I've spent entire day trying to figure this out....thinking it has something to do with my validation and record insert not working.

<div class="fullColumnGroup">
<label for="Full_Name" class="sublabel" > Name<span class="requiredIndicator">&nbsp;*</span></label>
<div class="errorGroup">
<div class="fieldPair">
<div class="fieldGroup"> <span id="Full_Name_Spry">
<input id="Full_Name" name="Full_Name" type="text" value="" class="formTextfield_Large" tabindex="1" />
<span class="textfieldRequiredMsg">Please enter your name</span> </span> </div>
</div>
</div>
</div>

Sign in to reply to this post

Jason ByrnesWebAssist

the validated entries code from the first example does 2 things:

1) In the bindings panel, there is a validated entries binding group. Use these bindings for the initial value of the form elements to retain valid entries in the form when it it fails validation.

2) On the server behaviors panel, click the plus button and select WebAssist -> Validation -> Validation show if. This behavior is used to show an error message on the page when validation fails.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...