PICKZEN
Search…
⌃K

FormField

This class models a field of a FormSlide.
/**
* Returns the field Id.
*
* @returns {string}
*/
getId()
/**
* Returns the field title.
*
* @returns {string}
*/
getTitle()
/**
* Returns the field type: text, email, name, checknox, image, selector, dropdown, etc.
*
* @returns {string}
*/
getType()
/**
* Set a value for this field.
*
* @param val
*/
setValue(val)
/**
* Returns this field value.
*
* @returns {*}
*/
getValue()
/**
* Returns true if this field is mandatory.
*
* @returns {boolean}
*/
isMandatory()
/**
* Set the valid state for this field.
*
* @param state
*/
setValid(state)
/**
* Returns true if this field is valid after the complete form has been validated.
* So the validate method on the FormSlide have to be called before this method can be called.
*
* @param force If true, a immediate validation will be make, without the necessity of calling FormSlide.validate() *
*
* @returns {boolean}
*/
isValid(force)
/**
* Returns true if the field is empty.
*
* @returns {boolean}
*/
isEmpty()
/**
* Returns an object with the field metadata
* @returns Object
*/
getMeta()
/**
* Returns true if the field is hidden.
*
* @returns {boolean}
*/
isHidden()
/**
* Set if the field is hidden.
*
* @returns {*}
*/
setHidden(state)
/**
* Returns true if this field has a custom validator
* @returns {boolean}
*/
hasCustomValidator()
/**
* Validates the field with its custom validator and returns if it is valid.
*
* @returns {boolean}
*/
customValidate()
/**
* Clear all responses from this field.
*/
clear()