Properties Methods Events Config Options Direct Link
Observable
  Component
    Component
      Container
        Container
          Panel
            Panel
              FormPanel

Class Ext.form.FormPanel

Package:Ext.form
Defined In:FormPanel.js
Class:FormPanel
Extends:Panel

Simple form panel which enables easy getting and setting of field values. Can load model instances. Example usage:

var form = new Ext.form.FormPanel({
    items: [
        {
            xtype: 'textfield',
            name : 'first',
            label: 'First name'
        },
        {
            xtype: 'textfield',
            name : 'last',
            label: 'Last name'
        },
        {
            xtype: 'numberfield',
            name : 'age',
            label: 'Age'
        },
        {
            xtype: 'urlfield',
            name : 'url',
            label: 'Website'
        }
    ]
});

Loading model instances:

Ext.regModel('User', {
    fields: [
        {name: 'first', type: 'string'},
        {name: 'last',  type: 'string'},
        {name: 'age',   type: 'int'},
        {name: 'url',   type: 'string'}
    ]
});

var user = Ext.ModelMgr.create({
    first: 'Ed',
    last : 'Spencer',
    age  : 24,
    url  : 'http://extjs.com'
}, 'User');

form.load(user);

Config Options

Config OptionsDefined By
 baseCls : String
The base CSS class to apply to this panel's element (defaults to 'x-panel').
Panel
 baseParams : Object
Optional hash of params to be sent (when standardSubmit configuration is false) on every submit.
FormPanel
 centered : Boolean
Center the Component. Defaults to false.
Component
 componentCls : String
CSS Class to be added to a components root level element to give distinction to it via styling.
Component
 data : Mixed
The initial set of data to apply to the tpl to update the content area of the Component.
Component
 disabled : Boolean
Defaults to false.
Component
 disabledCls : String
CSS class to add when the Component is disabled. Defaults to 'x-item-disabled'.
Component
 draggable : Boolean
Allows the component to be dragged via the touch event.
Component
 floating : Boolean
Create the Component as a floating and use absolute positioning. Defaults to false.
Component
 floatingCls : Boolean
The class that is being added to this component when its floating. (defaults to x-floating)
Component
 height : Number
The height of this component in pixels.
Component
 hidden : Boolean
Defaults to false.
Component
 monitorOrientation : Boolean
Monitor Orientation change
Component
 standardSubmit : Boolean
Wether or not we want to perform a standard form submit. Defaults to false
FormPanel
 stopMaskTapEvent : Boolean
True to stop the event that fires when you click outside the floating component. Defalts to true.
Component
 styleHtmlCls : String
The class that is added to the content target when you set styleHtmlContent to true. Defaults to 'x-html'
Component
 url : String
The default Url for submit actions
FormPanel
 width : Number
The width of this component in pixels.
Component

Public Properties

PropertyDefined By
 draggable : Boolean
Read-only property indicating whether or not the component can be dragged
Component
 items : Ext.util.MixedCollection
The MixedCollection containing all the child items of this container.
Container
 record : Ext.data.Model
The Model instance currently loaded into this form (if any). Read only
FormPanel
 rendered : Boolean
Read-only property indicating whether or not the component has been rendered.
Component

Public Methods

MethodDefined By

Public Events

EventDefined By