Properties Methods Events Config Options Direct Link
Observable
  BasicForm

Class Ext.form.BasicForm

Package:Ext.form
Defined In:BasicForm.js
Class:BasicForm
Extends:Observable

Encapsulates the DOM <form> element at the heart of the FormPanel class, and provides input field management, validation, submission, and form loading services.

By default, Ext Forms are submitted through Ajax, using an instance of Ext.form.Action.Submit. To enable normal browser submission of an Ext Form, use the standardSubmit config option.

File Uploads

File uploads are not performed using Ajax submission, that is they are not performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the DOM <form> element temporarily modified to have its target set to refer to a dynamically generated, hidden <iframe> which is inserted into the document but removed after the return data has been gathered.

The server response is parsed by the browser to create the document for the IFRAME. If the server is using JSON to send the return object, then the Content-Type header must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.

Characters which are significant to an HTML parser must be sent as HTML entities, so encode "<" as "&lt;", "&" as "&amp;" etc.

The response text is retrieved from the document, and a fake XMLHttpRequest object is created containing a responseText property in order to conform to the requirements of event handlers and callbacks.

Be aware that file upload packets are sent with the content type multipart/form and some server technologies (notably JEE) may require some custom processing in order to retrieve parameter names and parameter values from the packet content.

Config Options

Config OptionsDefined By
 method : String
The request method to use (GET or POST) for form actions if one isn't supplied in the action options.
BasicForm
 timeout : Number
Timeout for form actions in seconds (default is 30 seconds).
BasicForm
 url : String
The URL to use for form actions if one isn't supplied in the doAction options.
BasicForm
 waitTitle : String
The default title to show for the waiting message box (defaults to 'Please Wait...')
BasicForm

Public Properties

PropertyDefined By
 items : MixedCollection
A MixedCollection containing all the Ext.form.Fields in this form.
BasicForm

Public Methods

MethodDefined By

Public Events

EventDefined By