Nice sample code for the Manual! On Sun, Dec 11, 2011 at 5:47 PM, Stan Winchester <[email protected]>wrote:
> disregard line: message = ""; > > > On Sun, Dec 11, 2011 at 9:46 AM, Stan Winchester <[email protected] > > wrote: > >> Here is an over simplified test you might try: >> <cfscript> >> str = ListFirst(CreateUUID(),"-"); >> if ( StructKeyExists(FORM,"accesscode") ) { >> message = ""; >> if ( NOT Compare(FORM.hidStr,hash(FORM.accesscode)) ) { >> human = true; >> }else{ >> human = false; >> } >> writeOutput("Are you human? " & human); >> } >> </cfscript> >> <cfoutput> >> <form action="#CGI.SCRIPT_NAME#" method="post"> >> <cfcaptcha width="200" height="40" border="1" displaystring="#str#" /> >> <input type="hidden" name="hidStr" value="#hash(str)#" /> >> <br /> >> Access Code: >> <br /> >> <input type="text" name="accesscode" value="" size="20" maxlength="20" /> >> <input type="submit" name="submit" value="Submit" /> >> </form> >> </cfoutput> >> >> On Sun, Dec 11, 2011 at 12:05 AM, ogrehulk <[email protected]> wrote: >> >>> I am successfully able to see the captcha image when using the >>> cfcaptcha tag as demonstrated in other posts. However, how does it >>> implement into a form? I have not been able to find any sample code >>> that is encased within the form tag using a input and submit. So I do >>> not know how this validates. Any help would be great or maybe some >>> documentation of how to do this. Thanks in advance! >>> >>> -- >>> online documentation: http://openbd.org/manual/ >>> google+ hints/tips: https://plus.google.com/115990347459711259462 >>> http://groups.google.com/group/openbd?hl=en >>> >> >> > -- > online documentation: http://openbd.org/manual/ > google+ hints/tips: https://plus.google.com/115990347459711259462 > http://groups.google.com/group/openbd?hl=en > -- online documentation: http://openbd.org/manual/ google+ hints/tips: https://plus.google.com/115990347459711259462 http://groups.google.com/group/openbd?hl=en
