Skip to content

Instantly share code, notes, and snippets.

@gregbarry
Created March 5, 2014 00:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregbarry/9358392 to your computer and use it in GitHub Desktop.
Save gregbarry/9358392 to your computer and use it in GitHub Desktop.
Ext.create('Ext.form.Panel', {
title: 'Simple Form',
bodyPadding: 5,
width: 350,
layout: 'anchor',
defaults: {
anchor: '100%'
},
viewModel: {
data: {
fname: 'The',
lname: 'Doctor',
buttonText: 'Who?'
}
},
defaultType: 'textfield',
items: [{
fieldLabel: 'First Name',
name: 'first',
allowBlank: false,
bind: {
value: '{fname}'
}
},{
fieldLabel: 'Last Name',
name: 'last',
allowBlank: false
},{
xtype: 'button',
}],
renderTo: Ext.getBody()
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment