View Full Version : How to pass values from a form panel(Parent Window) to Ext.window Element(Pop-up)
venkateshns
6 Dec 2011, 3:15 AM
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
tvanzoelen
6 Dec 2011, 3:48 AM
Try to get the values of the form with getValues(). It returns an object.
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
});
var values = formpanel.getForm().getValues();
to be more precise :)
tvanzoelen
6 Dec 2011, 4:36 AM
Well, not needed. form.Panel has a function getValues()
that does
formpanel.getForm().getValues();
formpanel.getValues() is a bit shorter :)
oh, i missed the introduction of this shortcut. good point!
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.