# inputEx-library

### inputEx 0.5.1

inputEx-library > inputEx > inputEx.Form
Search:
Filters Show Private Show Protected Show Deprecated

## Class inputEx.Form - extends inputEx.Group

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

### Constructor

inputEx.Form `( )`

Parameters:
  `<Object} options 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 inherited from inputEx.Field:

`options`

### Methods

#### asyncRequest

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

#### destroy

`void destroy ( )`
Purge all event listeners and remove the component from the dom

#### disable

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

#### enable

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

#### hideMask

`void hideMask ( )`
Hide the form mask

#### initEvents

`void initEvents ( )`
Init the events

#### onSubmit

`void 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

`void render ( )`
Render the group

#### renderButtons

`void renderButtons ( )`
Render the buttons

#### renderMask

`void renderMask ( )`
Create a Mask over the form

#### setOptions

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

Parameters:
  `options <Object>` Options object as passed to the constructor

#### showMask

`void showMask ( )`
Show the form mask

#### Methods inherited from inputEx.Field:

`clear, close, destroy, disable, displayMessage, enable, fireUpdatedEvt, focus, getEl, getParentField, getState, getStateString, getValue, hide, initEvents, isDisabled, isEmpty, onBlur, onChange, onFocus, render, renderComponent, setClassFromState, setFieldName, setOptions, setParentField, setValue, show, validate`

#### Methods inherited from inputEx.Group:

`clear, close, destroy, disable, enable, focus, getFieldByName, getFieldsStates, getValue, initEvents, onChange, render, renderField, renderFields, runAction, runFieldsInteractions, runInteractions, setErrors, setOptions, setValue, toggleCollapse, validate`

#### Events inherited from inputEx.Field:

`updatedEvt,`

Copyright © 2010 Eric Abouaf All rights reserved.