fm:Form_Captcha


UNFINISHED

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.

Example

<fm:Form_Captcha value="Enter the text in the image" />

Outputs

captcha

Supported attributes

NameRequiredDefaultDescription
autocompleteOptionalemptyThe value of the non-standard autocomplete attribute of the text field
classOptionalThe css classname that will be assigned to the actual html form field. Note that a few default classes might be added
disabledOptionalN/AThis will set the html disabled attribute
idOptionalrandomizedThe id of the form element. Note that this id will also be used for the 'for' attribute in the <label> component
labelOptionalN/AThis attribute will be used to generate labels for this component, if it's used within an fm:Form component
languageOptionalN/AThis specifies which language to use for the display of the form_country dropdown. Choices are:
  • en - English
  • es - Spanish
  • fr - French
  • nl - Dutch
maxlengthOptionalemptyThe maximum length of text allowed in the text box
nameOptionalemptyThe name attribute for the text box, typically this should be "captcha"
readonlyOptionalN/AThis sets the html readonly attribute and controls if the user can change the value
requiredOptional0Set required to '1' if you'd like the form validator to check if this form element has a value before submitting
sizeOptionalemptySets the size of the text box; we recommend using CSS to control this instead
styleOptionalemptyThe style attribute for the text box
titleOptionalN/AThe value for the title attribute on the text field
valueOptionalemptyThe current value of the text box

Most of the attributes you see here are just passed through to the actual input field.

Functional Example

<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>

Outputs

captcha

See also