The documentation for this component is incomplete and should not be promoted to public viewing. While the documentation below should be correct, there may be better ways to demonstrate its use and some portions of the various CAPTCHA components should likely be refactored for better maintainability.
This component displays a CAPTCHA and a text box to verify that a human is performing some action.
The image is rendered internally by an fm:Form_CaptchaImage component. All attributes of the fm:Form_CaptchaImage can be assigned to the fm:Form_Captcha component and they will be passed through intact.
<fm:Form_Captcha value="Enter the text in the image" />
Name | Required | Default | Description |
---|---|---|---|
autocomplete | Optional | empty | The value of the non-standard autocomplete attribute of the text field |
class | Optional | The css classname that will be assigned to the actual html form field. Note that a few default classes might be added | |
disabled | Optional | N/A | This will set the html disabled attribute |
id | Optional | randomized | The id of the form element. Note that this id will also be used for the 'for' attribute in the <label> component |
label | Optional | N/A | This attribute will be used to generate labels for this component, if it's used within an fm:Form component |
language | Optional | N/A | This specifies which language to use for the display of the form_country dropdown. Choices are:
|
maxlength | Optional | empty | The maximum length of text allowed in the text box |
name | Optional | empty | The name attribute for the text box, typically this should be "captcha" |
readonly | Optional | N/A | This sets the html readonly attribute and controls if the user can change the value |
required | Optional | 0 | Set required to '1' if you'd like the form validator to check if this form element has a value before submitting |
size | Optional | empty | Sets the size of the text box; we recommend using CSS to control this instead |
style | Optional | empty | The style attribute for the text box |
title | Optional | N/A | The value for the title attribute on the text field |
value | Optional | empty | The current value of the text box |
Most of the attributes you see here are just passed through to the actual input field.
<fm:Form action="/action/captchacomment" method="post">
<input type="hidden" name="mid" value="100" />
<textarea name="comment">Your comment</textarea>
<fm:Captcha name="captcha" value="Enter the text in the image" />
<input type="submit" />
</fm:Form>