Modify a Sencha Touch Ext.Msg.Prompt with Custom Buttons

I’ll just skip to showing you the code… basically, just create your own message box instead of using the default prompt.  You create your own buttons and set custom text to whatever you like.

Ext.Msg.show({
  title   : 'Enter Email Address',
  msg     : null,
  buttons : [{
    itemId : 'ok',
    text   : 'Send',
    ui     : 'action'
  },{
    itemId : 'cancel',
    text   : 'Cancel'
  }],
  prompt  : { maxlength : 180, autocapitalize : false },
  fn      : function(text,btn) {
    // do some stuff
  }
});

©2005-2017 Blog – Epiphany Digital is proudly powered by Badgers and Web Design is by Epiphany Digital
Entries (RSS) and Comments (RSS). 35 queries. 12.977 seconds.

Thank you for visiting this site. The web fairy will visit you in your sleep... you know, I was going somewhere with this, but it really doesn't have as much innocent charm as the tooth fairy, especially when I picture the web fairy as someone much like the Simpsons' Comic Book Guy but with wings. It's just not something I want.