Class ONEGEEK.forms.GValidator


class ONEGEEK.forms.GValidator
The GValidator object finds any forms on the page with classname 'autoform' or 'gform' and attaches validation events to the inputs based on class names of the elements. If the element is a required item a * is automatically placed beside the form item and the validation script will ensure it is completed
Defined in ONEGEEK.forms

Variable Summary
The set of forms to apply validation to

Function Summary
public void addLoadEventGVal (Function func)
Add load event function.
public void applyFocus()
Apply focus to the first input element of the first form.
public void autoApplyFormValidation()
Automatically apply form validation functions to any {autoform,gform} class.
public void readPlugins()
Read in any user-defined plug-ins.

Variable Details

variable ONEGEEK.forms.Form[] gForms

The set of forms to apply validation to

Function Details

function addLoadEventGVal

public void addLoadEventGVal(Function func)
Add load event function.
Parameters:
func The function to add to the window.onload function
Returns:
void

function applyFocus

public void applyFocus()
Apply focus to the first input element of the first form. Is called after validation has been applied...
Returns:
void

function autoApplyFormValidation

public void autoApplyFormValidation()
Automatically apply form validation functions to any {autoform,gform} class.
Returns:
void

function readPlugins

public void readPlugins()
Read in any user-defined plug-ins. Must come from a user created ONEGEEK.forms.GValidator.plugin variable.
Returns:
void