Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1246 in a recent build.
  1. #1
    Sencha User
    Join Date
    Apr 2010
    Posts
    29
    Vote Rating
    1
    Sno is on a distinguished road

      0  

    Red face Reset MsgBox

    Reset MsgBox


    Hi,

    I am having difficulties with msgbox.

    I have user input email address. Than after email validation, a msgbox will either popup to ask for password (prompt), or if email address is not valid, it will request to register (show).

    However, if prompt runs before show, the text field from prompt still appears.

    I am looking for the correct way to reset / set default / remove text field.

    Code:
    if (Ext.getCmp('email').getValue() == "me"){                                    
         Ext.Msg.prompt('Password', 'Please enter your password:', function(text) {
                                            
          });
    }else{
           Ext.Msg.show({
                   title:'Account unavailable',
                   msg: "I'm sorry, we were unable to locate this account. Would you like to register it?",
                   buttons: [{text:'Cancel'},
                                 {text:'Register',handler:function(btn, text){
                                                      
                                 }}]
              });
    }
    Thank you.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,047
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    According to the API docs... you should be able to set the prompt config to false and it will remove the text field. Sounds like a bug so I will report a bug.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1