PDA

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
});

tobiu
6 Dec 2011, 4:31 AM
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 :)

tobiu
6 Dec 2011, 5:24 AM
oh, i missed the introduction of this shortcut. good point!