FieldSet is used to logically group together elements in a form, an example of which we saw in the first recipe of this chapter. This recipe shows how the Sencha Touch class can be used to create and group items under FieldSet.
Make sure that you have set up your development environment by following the recipes outlined in Chapter 1.
Make sure that you have followed the Getting your form ready with FormPanel recipe in this chapter.
Carry out the following steps:
Copy
ch02_01.js
toch02_12.js
.Open a new file named
ch02_12.js
and replace the definition offormBase
with the following code:var formBase = { items: [ { xtype: 'fieldset', title: 'About Me', items: [ { xtype: 'textfield', name : 'firstName', label: 'First Name' }, { xtype: 'textfield', name : 'lastName', label: 'Last Name' } ] } ] };
Include
ch02_12.js...