inputEx Documentation Back to homepage

### inputEx Documentation > inputEx.Form 0.2.2

## Static Class inputEx.Form - extends inputEx.Group

Create a group of fields within a FORM tag and adds buttons

### Constructor

inputEx.Form `( options )`

Parameters:
  `options <Object>` - The following options are added for Forms:
  - buttons: list of button definition objects {value: 'Click Me', type: 'submit'}
  - ajax: send the form through an ajax request (submit button should be present): {method: 'POST', uri: 'myScript.php', callback: same as YAHOO.util.Connect.asyncRequest callback}
  - showMask: adds a mask over the form while the request is running (default is false)

### Properties

#### static groupOptions `- Object`

group Options for each field

#### options `- Object`

Configuration object to set the options for this class and the parent classes. See constructor details for options added by this class.

### Methods

#### asyncRequest

`asyncRequest()`
Send the form value in JSON through an ajax request

#### disable

`disable()`
Disable all fields and buttons in the form

#### enable

`enable()`
Enable all fields and buttons in the form

#### hideMask

`hideMask()`
Hide the form mask

#### initEvents

`initEvents()`
Init the events

#### onSubmit

`onSubmit(e)`
Intercept the 'onsubmit' event and stop it if !validate If the ajax option object is set, use YUI async Request to send the form
Parameters:

`e <Event>` - The original onSubmit event

#### render

`render()`
Render the group

#### renderButtons

`renderButtons()`
Render the buttons

#### renderMask

`renderMask()`
Create a Mask over the form

#### setOptions

`setOptions(options)`
Adds buttons and set ajax default parameters
Parameters:

`options <Object>` - Options object (inputEx inputParams) as passed to the constructor

#### showMask

`showMask()`
Show the form mask

#### toggleSelectsInIE

`toggleSelectsInIE(show)`
Parameters:

`show`

#### Methods inherited from class inputEx.Field:

`getEl, fireUpdatedEvt, show, onBlur, onFocus, getStateString, setClassFromState, updatedEvt, getState, hide, displayMessage, renderComponent, destroy, isEmpty,`

#### Methods inherited from class inputEx.Group:

`getValue, validate, getFieldByName, toggleCollapse, setValue, clear, onChange, focus, runAction, renderField, renderFields, close, runInteractions,`

Copyright (c) 2007-2009 Eric Abouaf. All rights reserved.
Generated by JsDoc Toolkit 2.0.0 on Wed, 04 Mar 2009 15:41:31 GMT using neyricjslibs-template.