PDA

View Full Version : Get the field labels in form submit



mayurid
7 Sep 2010, 8:54 PM
hi,
i want to get the field labels of all the form fields while submitting the form.how to get the fields label?

Animal
7 Sep 2010, 8:58 PM
Fields contain a reference to their label. Check them.

mayurid
7 Sep 2010, 9:11 PM
i want to get the field labels in button handler, where i want to submit them to server and use them

Animal
7 Sep 2010, 9:14 PM
And I told you. The fields contain a reference to the label. Look inside the fields. You can see.

mayurid
7 Sep 2010, 9:18 PM
i am not getting? please help
{

xtype: 'textfield',
id: 'category_name',
name: 'category_name',
fieldLabel: 'category_name'
}
i want like getelementbyid().value something like this.

Animal
7 Sep 2010, 9:28 PM
Yes. Get the field by its ID and LOOK at it. Look. LOOK. LOOK at it.

(Look at it)

mayurid
7 Sep 2010, 9:46 PM
document.getElementsByTagName("category_name") ?

Condor
7 Sep 2010, 11:57 PM
var label = Ext.getCmp('category_name').label;
var text = label.dom.innerHTML;