FORMfields


FORMfields.fields.SessionVerificationField

Class SessionVerificationField

FormField
|
+--TextField
|
+--HiddenField
|
+--SessionVerificationField

public class SessionVerificationField
extends HiddenField

SessionVerificationField is a spam deterrent field that requires a client to utilize sessions. Please note that even sessions require at least minimal use of browser side cookies.

Since:
FORMfields v3.0

Constructor Summary

SessionVerificationField()

Constructs a new SessionVerificationField.

__construct()

Constructs a new SessionVerificationField.

Method Summary
boolean

isValid()

Checks for field errors detected by this field, including a check for blank.

Methods inherited from FORMfields.fields.HiddenField
getEditableFieldTag
Methods inherited from FORMfields.fields.TextField
getEditableFieldTag, isValid
Methods inherited from FORMfields.fields.FormField
addFieldValidator, addSubField, checkForBlank, clearValue, disable, formatRequestParameter, formatText, getButtonClicked, getData, getDbValue, getDisableFieldJs, getDisableJs, getDisableLabelJs, getDisplayFieldTag, getDisplayHtmlValue, getDisplayLabelTag, getDisplayValue, getEditable, getEditableFieldTag, getEditableLabelTag, getEnabled, getError, getExtraHtml, getFieldTag, getFormError, getHelp, getHelpTag, getHidden, getHiddenFieldTag, getId, getIsData, getIsHidden, getLabel, getLabelHtml, getLabelTag, getName, getOrNull, getParameter, getRawDbValue, getRequired, getValue, isBlank, isEmpty, isValid, setAutoPropagate, setData, setDbValue, setDisplayValuesOnNewLine, setEditable, setEnabled, setEndingString, setError, setExtraHtml, setFieldBelowLabel, setFormError, setHelp, setHidden, setHtmlify, setId, setIsData, setIsHidden, setLabel, setName, setRequired, setTrimWhitespace, setValue, setValueIsHtml, validate

Constructor Detail

SessionVerificationField

public SessionVerificationField()

Constructs a new SessionVerificationField.

Since:
FORMfields v3.0
Deprecated:
deprecated as constructor syntax is not expected in PHP 5 - will be removed once PHP 5 becomes a minimum requirement for FORMfields

__construct

public __construct()

Constructs a new SessionVerificationField.

Since:
FORMfields v3.0

Method Detail

isValid

public boolean isValid()

Checks for field errors detected by this field, including a check for blank. This method ensures that the user is using sessions, something that most spam bots don't. If an error is detected, the setError() method is called to set the appropriate error message.

Returns:
true if there is an error or false otherwise
Since:
FORMfields v3.0

FORMfields