ASPX templates
Version 5.x > ASPX templates > Captcha Outside of BizForms View modes: 
User avatar
Member
Member
Ian Muir - 10/20/2011 12:26:40 PM
   
Captcha Outside of BizForms
Is it possible to use the captcha/Security Code control used in BizForms in our own custom template? Our client has a site with several BizForms and one custom built form and we would like to use the same Captcha to be consisitent.

User avatar
Member
Member
kentico_michal - 10/30/2011 6:02:11 AM
   
RE:Captcha Outside of BizForms
Hello,

You can use the SecurityCode control:

<%@ Register Src="~/CMSFormControls/Inputs/SecurityCode.ascx" TagName="SecurityCode" TagPrefix="uc1" %>

<uc1:SecurityCode ID="captchaElem" runat="server" />


// to verify captcha text use IsValid method
if (captchaElem.IsValid())
{

}


An example of this control can be seen in the Custom registration form web part (~\CMSWebParts\Membership\Registration\CustomRegistrationForm.ascx)

Best regards,
Michal Legen

User avatar
Member
Member
Ian Muir - 10/31/2011 12:12:52 PM
   
RE:Captcha Outside of BizForms
Thanks Michal, that works great.