Class: FormInput

FormInput


new FormInput(field, form)

Class FormInput, represents any input in a form
Parameters:
Name Type Description
field Object The input parameters
form Form The form the input is asssociated with
Source:

Methods


addError(text)

Display an error on the input
Parameters:
Name Type Description
text string The error message to set to the input
Source:

data(prop)

Get a property data of the field
Parameters:
Name Type Description
prop string the property to get the data value
Source:
Returns:
The value of the property
Type
styring

isValid()

Check the value of the field is valid
Source:
Returns:
True if the field is valid, false else
Type
bool

removeError()

Remove the errors on the input
Source:

val(value)

Get or set the value of the field
Parameters:
Name Type Description
value string If this variable is set, it will be set to the input
Source:
Returns:
The input value or the value that has been set
Type
string