Simple login form with SenchaTouch -


Just diving in Sanchach that looks very promising.

I'm looking for a way to do the following things:

  • I have a simple login form check source for my first application,
  • Display the 'Good' error message when login / password is incorrect. 'Please enter your credentials may be red to change); I do not know how to use this property.

  • If login success, close the form and load the application (perhaps another JS file).

    Very simple, but I'm a newbie for this,

    1) Fields have a method called" Id , then use it when you want to update the instructions later.

      ... item: [Xtype: 'fieldet', id: 'fieldset', headline: 'login', instructions: 'please enter your credentials', default: {expected: true Label: 'left', labelWidth: '40% '}, items: [[Xtype:' emailfield ', name:' email ', label:' email ', placeholder:' your@email.com ', use clear icon : True}, {xtype: 'passwordfield', name: 'password', label: 'password', use clear iacon: wrong}]}], ... // wherever you want to update the instructions var fieldset = Ext.getCmp ('fieldet'); Fieldset.setInstructions ('My new directions!');   

    2) Here's a simple demo:

      // Create a panel, which is a full screen, and will have your form and another item in it You want to show var wrapper = new Ext.Panel at some point ({fullscreen: right, layout: 'card', // my two item items: [form, {xtype: 'panel', html: ''. The second panel, which is not visible on the render. '}]}); // Replace active cards / items when you have to wrapper.setActiveItem (1); // start with 0   

    Make sure that you remove the fullscreen from your form, because it is no longer full screen (this is a wrapper panel).

Comments