JavaXT
|
|||||||||||||||
Form ClassUsed to create a container with form inputs
ConstructorsUsed to instantiate this class
Config Optionsonsubmit
buttons An array of buttons that will be placed at the bottom of the form (e.g. submit, cancel, reset). Example:
buttons: [ { name: "Submit", onclick: function(){ var values = form.getData(); //TODO: validate form data } }, { name: "Reset", onclick: function(){ form.clear(); } } ] style Style for individual elements within the component. Note that you can provide CSS class names instead of individual style definitions.
EventsPublic MethodsgetData( ) Returns the values for all the form inputs in JSON notation. Note that if the form has multiple inputs with the same name, the associated value will be an array. You can test whether the value is an array using the "instanceof Array" operator. getButton( name ) Returns a button found at the bottom of the form
getGroups( ) Returns an array of groups found in the form. Each entry in the array has a name and custom methods for the group. enableField( name ) Used to enable a form input. Returns true if the field was found and is enabled. disableField( name ) Used to disable a form input. Returns true if the field was found and is disabled. hideField( name ) Used to hide a form input. Returns true if the field was found and hidden from view. showField( name ) Used to unhide a form input. Returns true if the field was found and is visible. setValue( name, value, silent ) Used to set the value for an input in the form.
findField( name ) Used to find a row in the form.
|