Sitefinity 6.2 Captcha for Forms - Feature Previews & Betas - Feature Previews & Betas - Progress Community
 Feature Previews & Betas

Sitefinity 6.2 Captcha for Forms

  • Sitefinity 6.2 Captcha for Forms

    Currently, there is no way to enable captcha in Forms through the backend interface.


    Forms Backend
    As a user in Forms, in a form Settings section I should see an option to enable captcha. The option is not selected by default.  See screenshot

    Forms Frontend (MUST) 
    Once enabled, this option will display captcha control upon submission to this form. Captcha should not display to authenticated users.

    Advanced Settings (MUST)
    As a developer in Advanced settings, I see option to edit the properties for the Telerik RadCaptcha control. When I edit some settings, these are applied on all places where captcha is used.

    Basic Settings (SHOULD)
    As a user in Basic settings, I see option to edit Captcha settings for the site via the interface. The following options should be present:

    Extensibility (MUST)
    As a developer I should be able to add RadCaptcha to any custom form on the site. I should see an example on how to add and configure it.  

    Is there a request which this implementation doesn't cover ?

    - Kalina

  • I agree with Steve.
    Instead of a checkbox, it should be a widget to be dragged and dropped into the form, like any other form widgets.
    The form may have a complex layout, and this flexibility would simplify positioning Captcha widget.
  • If captcha is delivered as a form widget, the settings should be defined in widget settings as per form; not globally in Basic/Advanced settings pages.

    Also I would like to see an option for reCAPTCHA. It is often asked for by our clients:
  • WOOHOO!  Guess I don't need to include this with my controls in 6.2 now :)

    Why do we need a checkbox to enable it?  Wouldn't just having it in the toolbox to drag and drop suffice?
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Linq;
    using System.Net;
    using System.Net.Mail;
    using System.Text;
    using System.Text.RegularExpressions;
    using Telerik.Microsoft.Practices.EnterpriseLibrary.Logging;
    using Telerik.Sitefinity.Configuration;
    using Telerik.Sitefinity.Modules.Forms;
    using Telerik.Sitefinity.Modules.Forms.Web.UI;
    using Telerik.Sitefinity.Modules.Forms.Web.UI.Fields;
    using Telerik.Sitefinity.Services;
    using Telerik.Sitefinity.Web.UI;
    using Telerik.Sitefinity.Web.UI.Fields;
    using Telerik.Web.UI;
    namespace RandomSiteControls.Forms
        /// <summary>
        /// Add the captcha control to your toolbox like this
        ///     <toolbox name="FormControls">
        ///         <sections>
        ///             <add name="Common">
        ///                 <tools>
        ///                     <add enabled="True" type="Telerik.Web.UI.RadCaptcha, Telerik.Web.UI" title="RadCaptcha" description="RadCaptcha" visibilityMode="None" name="RadCaptcha" />
        ///                 </tools>
        ///             </add>
        ///         </sections>
        ///     </toolbox>
        /// </summary>
        public class FormCaptcha : FormsControl
            protected override void InitializeControls(GenericContainer container)
                if (!SystemManager.IsDesignMode)
                    //Hide the form if JS is disabled, it'll let them bypass the required fields.
                    this.BeforeFormSave += new EventHandler<CancelEventArgs>(FormsControlCustom_BeforeFormSave);
            #region EVENTS
            protected void FormsControlCustom_BeforeFormSave(object sender, CancelEventArgs e)
                if (this.MyCaptcha != null)
                    if (!this.MyCaptcha.IsValid)
                        e.Cancel = true;
                        this.MyCaptcha.ErrorMessage = this.CaptchaErrorMessage;
            #region METHODS
            #region Properties
            private RadCaptcha _captcha = null;
            protected RadCaptcha MyCaptcha
                    if (!SystemManager.IsDesignMode)
                        foreach (var control in this.FormControls.Controls[1].Controls)
                            if (control.GetType() == typeof(RadCaptcha))
                                _captcha = control as RadCaptcha;
                    return _captcha;
            private string _captchaErrorMessage = "Invalid Code, please try again";
            /// <summary>
            /// This gets edited in advanced mode
            /// </summary>
            public string CaptchaErrorMessage
                    return _captchaErrorMessage;
                    _captchaErrorMessage = value;

  • Hi Steve and Osman,
    Since you both find having a widget in Forms more convenient, we will apply this approach.
    To summarize: the Captcha widget can be dropped to a Form. It will have a Widget Designer allowing the user to set it's behavior, similar to the Settings section  on the RadCaptcha Demo

    As to reCaptcha  - we will provide a documentation or sample on how to add it to forms.

    Thanks again for your feedback,
  • Hi Markus,
    Editing the character set will be possible in Widget Advanced Edit mode. All properties of RadCaptcha will be displayed for editing there.
    - Kalina
  • Dear Kalina

    On think I would defenitely like to see is the possibility to set characters.

    I usually remove the following letters and numbers (zero, captial O, small cap letter L, capitel letter I) since I hate it when I get a captcha and never know if its an zero or an O or a capital i or small L)

  • Hi Steve,
    We saved time from a checkbox but will invest in a Captcha widget designer instead :)
    Anyway, since your request is not directly related to Captcha in Forms, i posted a reply here:


  • Kali, since you've saved time not implimenting the checkbox....can we maybe get frond-end subscribe, subscription list, or permissions?