These forms do not do anything and have very little validation. They solely demonstrate how you can use Ext Forms to build and layout forms on the fly.
The js is not minified so it is readable.
Ext.onReady(function(){
Ext.QuickTips.init();
// turn on validation errors beside the field globally
Ext.form.Field.prototype.msgTarget = 'side';
/*
* ================ Simple form =======================
*/
var simple = new Ext.form.Form({
labelWidth: 75, // label settings here cascade unless overridden
url:'save-form.php'
});
simple.add(
new Ext.form.TextField({
fieldLabel: 'First Name',
name: 'first',
width:175,
allowBlank:false
}),
new Ext.form.TextField({
fieldLabel: 'Last Name',
name: 'last',
width:175
}),
new Ext.form.TextField({
fieldLabel: 'Company',
name: 'company',
width:175
}),
new Ext.form.TextField({
fieldLabel: 'Email',
name: 'email',
vtype:'email',
width:175
}),
new Ext.ux.PasswordMeter({
fieldLabel: 'Password',
name: 'password',
width:175
})
);
simple.addButton('Save');
simple.addButton('Cancel');
simple.render('form-ct');
});
Demo: http://testcases.pagebakers.com/PasswordMeter/
Download: http://testcases.pagebakers.com/PasswordMeter/passwordmeter.js
and http://testcases.pagebakers.com/PasswordMeter/Ext.ux.PasswordMeter.js
Source: http://testcases.pagebakers.com/PasswordMeter/

Related Listings:
RSS feed for comments on this post. TrackBack URL
November 30th, 2009 at 2:16 am
[...] ExtJS Password Meter These forms do not do anything and have very little… [...]