Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. var form = Ext.create('Ext.form.Panel',{
  2. layout: 'vbox',
  3. width: 300,
  4. height: 100,
  5. defaults: {
  6. labelStyle: 'padding:7 0 0 25;',
  7. },
  8. items: [{
  9. xtype: 'field',
  10. name: 'Username',
  11. fieldLabel: 'Username',
  12. value: 'Your Username',
  13. },
  14. {
  15. xtype: 'field',
  16. fieldLabel: 'Password',
  17. name: 'Password',
  18. value: '',
  19. inputType: 'password',
  20. allowBlank: false,
  21. minLength:5,
  22. /* validator : function(){
  23. alert('ttt');
  24. return false;
  25. },
  26. validateOnChange: true*/
  27. listeners:{
  28. focus : function(){
  29. alert(this.isValid()); // Always shows "true"
  30. }
  31. }
  32. }],
  33. buttons: [{
  34. text: 'Submit',
  35. margin: '0 100 0 0',
  36. formBind: true,
  37. handler: function(){
  38. alert('submitted');
  39. }
  40. }]
  41. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement