Properties Methods Events Config Options Direct Link
Observable
  BasicForm

Class CQ.Ext.form.BasicForm

Package:CQ.Ext.form
Class:BasicForm
Extends:CQ.Ext.util.Observable
Clientlib:cq.widgets

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 CQ.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 Options Defined By
  method : String
The request method to use (GET or POST) for form actions if one isn't supplied in the action options.
BasicForm

Public Properties

Property Defined By
  items : MixedCollection
A MixedCollection containing all the CQ.Ext.form.Fields in this form.
BasicForm

Public Methods

Method Defined By

Public Events

Event Defined By