Adobe Dreamweaver Forums



Last 10 THreads :         Importing AI files into Flash (Last Post : Darr_darshan - Replies : 1 - Views : 2 )           »          loop over query (Last Post : Dan Bracuk - Replies : 1 - Views : 2 )           »          String split function? (Last Post : Ian Skinner - Replies : 5 - Views : 6 )           »          The 'overflow' property... (Last Post : Michael Fesser - Replies : 1 - Views : 2 )           »          Is it possible to bottom-justify text within a
? (Last Post : mjs - Replies : 15 - Views : 16 )           »          Design view breaks layout (Last Post : Michael Fesser - Replies : 4 - Views : 5 )           »          Reload previous page link, HELP!! (Last Post : Zorrrro - Replies : 6 - Views : 7 )           »          Problem loading flash video (Last Post : InCog - Replies : 0 - Views : 1 )           »          Multiple domain names (Last Post : Murray *ACE* - Replies : 3 - Views : 4 )           »          Dreamweaver Template Problem (Last Post : nowherecreative - Replies : 12 - Views : 13 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Dreamweaver: Main > Dreamweaver VB Script Development
 
Tags: , ,

Reply
  #1 (permalink)  
Old 05-06-2008, 09:05 PM
George_Vam@adobeforums.com
 
Posts: n/a
Diggs:
Default Re: Captcha form validation ?

Here's a simple way to add CAPTCHA functionality to your ADDT forms.


* Download the ASP CAPTCHA security image generator (captcha.asp) from www.tipstricks.org and upload it to your server.

* Start the custom form wizard, add all the needed fields plus a text field for the user's security character input. For convenience let's name that field "txtCAPTCHA". You can make the txtCAPTCHA field required but it's not necessary.

* Add the security image to your form which is just an image with its source pointing to the CAPTCHA script you downloaded in step 1. If you uploaded the script to your includes folder then the code for the image would be similar to: <img src="includes/captcha.asp">.

* Add a BEFORE trigger and enter the following code:
Dim txtCAPTCHA
Dim sesCAPTCHA

txtCAPTCHA = tNG.getColumnValue("txtCAPTCHA")
sesCAPTCHA = Trim(Session("CAPTCHA"))

If Cstr(txtCAPTCHA) <> Cstr(sesCAPTCHA) OR Len(sesCAPTCHA) < 1 Then
Set check_failure = new tNG_error
'check_failure.init "Check security code!", Array(), Array()
check_failure.setFieldError "txtCAPTCHA", "Incorrect security code", array()
Set Trigger_Custom1 = check_failure
Else
Set Trigger_Custom1 = nothing
End If
* Add a custom AFTER trigger and enter the following code:
Session("CAPTCHA") = vbNullString


That's it! Enjoy.
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 06:42 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk