s@rdalya

 

FormField

Page history last edited by vozcelik 3 yrs ago


 

FormField

(extends CBObject)


Object Summary

 

Models an HTML form element.

 

This object as well has been added after the removal of Formobject. s@rdalya.

 

The object makes form fields render in a different CSS class, if a validation error occurs on them.

 

For form validation, the object may be used in conjunction with Validator.


Constructor

 

FormField(elmField,strDefaultClass,strFocusClass,strErrorClass)

 

parameters

elmField - The String index or the object reference to the form field.

strDefaultClass - The CSS class to apply when not focused.

strFocusClass - The CSS class to apply when focused.

strErrorClass - The CSS class to apply when there is a validation error in the field.

 

comments

Creates a new FormField.


Methods

 

FormField.setError()

 

comments

Indicates that the field has a validation error.


FormField.clearError()

 

comments

Removes the error flag from the field.


FormField.hasError()

 

returns

true if the field has a validation error.

 

comments

Checks whether or not the field has a validation error in it.


FormField.recalculate()

 

comments

Regenerates the class name according to the error status.


See Also

 

None given.


Usage Examples

 

Comments (0)

You don't have permission to comment on this page.