View Full Version : assign form field to a variable

19 Aug 2009, 6:48 AM
Dear Ext Users,
I apologize if my question is too simple or stupid but I'm new to ExtJS.

I have this part of code:

var formPanel = new Ext.form.FormPanel({
//renderTo: "formpanel",
title: 'search by attributes',
region: 'south',
frame: true,
width: 600,
height: 100,
items: [{
id: "nomeid",
fieldLabel: 'nomelabel',
xtype: 'textfield',
name: 'NOME_AREA__like',
value: 'Marsica'
}, {
id: "lambdaid",
fieldLabel: 'lambda',
xtype: 'numberfield',
name: 'lambda__ge',
value: '0.01'
layout: 'anchor',
buttons: [{
text: "search",
handler: function(){
var foo1 = formPanel.getForm().getValues()...XXXXXXXX;
var foo2 = formPanel.getForm().getValues()...XXXXXXXX;


as you can see in my form there are two fields.
I would like to store the content of the two fields into two different variable...

this because later I would like to put this variables into an http request...

hope you can help me...