FormField
|
+--ImageVerificationField
public class ImageVerificationField
extends FormField
Field Summary | |
---|---|
mixed | Stores the randomly generated 6 digit integer code. |
Fields inherited from FORMfields.fields.FormField | |
---|---|
autoPropagate, data, disableEnterHandler, displayValuesOnNewLine, editable, enabled, endingString, enterTabHandler, enterTabs, error, extraHtml, fieldBelowLabel, formError, help, hidden, htmlify, id, isData, label, labelForId, multiValues, name, required, subFieldDisplayValueSeparator, subFieldSeparator, subFieldValueSeparator, subFields, subFieldsCannotBeEmpty, trimWhitespace, validators, value, valueIsHtml |
Constructor Summary | |
---|---|
ImageVerificationField(string label) Creates a new ImageVerificationField. |
|
__construct(string label) Creates a new ImageVerificationField. |
Method Summary | |
---|---|
string | Returns the HTML used to display the input portion of this field. |
string | Returns the HTML used to display the image tag of this field. |
boolean | isValid() Checks for field errors detected by this field, including a check for blank. |
public mixed $codeField
Stores the randomly generated 6 digit integer code.
public ImageVerificationField(string label)
Creates a new ImageVerificationField.
public __construct(string label)
Creates a new ImageVerificationField.
public string getEditableFieldTag()
Returns the HTML used to display the input portion of this field.
public string getImageTag()
Returns the HTML used to display the image tag of this field. This method will attempt to use the zlib extension to dynamically produce a scrambled image of a random code. If the zlib extension is not installed, this method will simply output the code as multiple images--a lot less secure.
public boolean isValid()
Checks for field errors detected by this field, including a check for blank. This method ensures that the entered code matches the code drawn in the verification image. If an error is detected, the setError() method is called to set the appropriate error message.
ImageVerificationField is a field that uses a randomly drawn integer code to ensure that the user who completes your form is a live person and not a spam bot.