Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var form = Ext.create('Ext.form.Panel',{
- layout: 'vbox',
- width: 300,
- height: 100,
- defaults: {
- labelStyle: 'padding:7 0 0 25;',
- },
- items: [{
- xtype: 'field',
- name: 'Username',
- fieldLabel: 'Username',
- value: 'Your Username',
- },
- {
- xtype: 'field',
- fieldLabel: 'Password',
- name: 'Password',
- value: '',
- inputType: 'password',
- allowBlank: false,
- minLength:5,
- /* validator : function(){
- alert('ttt');
- return false;
- },
- validateOnChange: true*/
- listeners:{
- focus : function(){
- alert(this.isValid()); // Always shows "true"
- }
- }
- }],
- buttons: [{
- text: 'Submit',
- margin: '0 100 0 0',
- formBind: true,
- handler: function(){
- alert('submitted');
- }
- }]
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement