<Captcha>

The Captcha tag renders as a CAPTCHA control at run time.

NOTE: Due to a limitation in the underlying DNN CAPTCHA control, this tag can only be used in the FormView module.

Syntax

<Captcha
    BackColor="color name|#dddddd"
    BackgroundColor="color name|#dddddd"
    BackgroundImage="url"
    BorderColor="color name|#dddddd"
    BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge| Inset|Outset"
    BorderWidth="size"
    CaptchaChars="string"
    CaptchaHeight="size"
    CaptchaLength="integer"
    CaptchaWidth="size"
    CssClass="string"
    ErrorMessage="string"
    ErrorStyle-BackColor="color name|#dddddd"
    ErrorStyle-BorderColor="color name|#dddddd"
    ErrorStyle-BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge|Inset|OutSet"
    ErrorStyle-BorderWidth="size"
    ErrorStyle-Font-Bold="True|False"
    ErrorStyle-Font-Italic="True|False"
    ErrorStyle-Font-Names="string"
    ErrorStyle-Font-Overline="True|False"
    ErrorStyle-Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium| Large|X-Large|XX-Large"
    ErrorStyle-Font-Strikeout="True|False"
    ErrorStyle-Font-Underline="True|False"
    ErrorStyle-ForeColor="color name|#dddddd"
    Expiration="integer"
    Font-Bold="True|False"
    Font-Italic="True|False"
    Font-Names="string"
    Font-Overline="True|False"
    Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium| Large|X-Large|XX-Large"
    Font-Strikeout="True|False"
    Font-Underline="True|False"
    ForeColor="color name|#dddddd"
    Height="size"
    ID="string"
    Text="string"
    Width="size"
/> 
 

Remarks

If your forms are available to the public, chances are you'll get web 'bots filling in those forms with bogus information. To help protect against this, you can add a CAPTCHA control to your form. The control attempts to prove the user is an actual human by asking them to view a series of characters and typing those characters into a box for verification. The characters are rendered as an image and are skewed and obfuscated so that (hopefully) only a human could read them. While it is no guarantee your forms won't get spammed, the control typically reduces the frequency of those attacks.

Back to top

Example

<addform>
  ...
  <table>
    <tr>
      <td>
        <label for="txtFirstName" text="First Name" />
        <textbox id="txtFirstName" datafield="FirstName" datatype="string" />
      </td>
    </tr>
    <tr>
      <td>
        <label for="txtLastName" text="First Name" />
        <textbox id="txtLastName" datafield="LastName" datatype="string" />
       </td>
    </tr>
    <tr>
      <td>
        <captcha captchalength="5" />
      </td>
    </tr>

    <tr>
      <td colspan="2">
        <addbutton text="Add"/>&nbsp;<cancelbutton text="Cancel"/>
      </td>
    </tr>
  </table>
</addform>
Back to top