O'Reilly logo

Ext JS 4 First Look by Loiane Groner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Form

The class FormPanel provides a container for forms. We usually use a form for data management. In Ext JS 4, FormPanel consists of Fields, FieldContainer, FieldSet, Label, and Actions. We will start with an example of form fields, explaining each one of them.

Form fields

Ext JS 4 introduces the Ext.form.field package, where all the form fields belong. We will look into each one of the classes from the previous diagram, with examples. First, we will declare a form with some fields:

Ext.create('Ext.form.Panel', { frame: true, title: 'Form Fields', width: 340, bodyPadding: 5, renderTo: 'form-example', fieldDefaults: { labelAlign: 'left', labelWidth: 90, anchor: '100%' }, items: [{ xtype: 'hiddenfield', //1 name: 'hiddenfield1', value: 'Hidden ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required