1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    21
    Vote Rating
    0
    venkateshns is on a distinguished road

      0  

    Default Answered: How to pass values from a form panel(Parent Window) to Ext.window Element(Pop-up)

    Answered: How to pass values from a form panel(Parent Window) to Ext.window Element(Pop-up)


    Hi,
    Can you tell me, how to pass the form field values to window element(pop-up). I am not having store and model here.

    Regards,
    Venkatesh

  2. Try to get the values of the form with getValues(). It returns an object.


    Code:
     
    var values = formpanel.getValues();
    
    var msg = values['fieldname1'] + '<br>';
    msg += values['fieldname2'];
    
    Ext.Msg.show({
         title:'Save Changes?',
         msg: msg,
         buttons: Ext.Msg.YESNOCANCEL,
         icon: Ext.Msg.QUESTION
    });

  3. #2
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,114
    Answers
    83
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    Try to get the values of the form with getValues(). It returns an object.


    Code:
     
    var values = formpanel.getValues();
    
    var msg = values['fieldname1'] + '<br>';
    msg += values['fieldname2'];
    
    Ext.Msg.show({
         title:'Save Changes?',
         msg: msg,
         buttons: Ext.Msg.YESNOCANCEL,
         icon: Ext.Msg.QUESTION
    });

  4. #3
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,681
    Answers
    130
    Vote Rating
    112
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    Code:
    var values = formpanel.getForm().getValues();
    to be more precise
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

  5. #4
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,114
    Answers
    83
    Vote Rating
    30
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    Well, not needed. form.Panel has a function getValues()

    that does

    Code:
    formpanel.getForm().getValues();
    formpanel.getValues() is a bit shorter

  6. #5
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,681
    Answers
    130
    Vote Rating
    112
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    oh, i missed the introduction of this shortcut. good point!
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

Thread Participants: 2