PDA

View Full Version : form.getValues does not get the value of a disable field



medley
24 Sep 2008, 3:15 AM
Hello,

I have a form with a disabled field :



var items = [{
fieldLabel : TOP.manageTasksDistributedBatch.column.task.name,
name : TOP.manageTasksDistributedBatch.column.task.name,
id : 'input.text.task',
disabled : true
},
TOP.combo.comboBoxStatus, // a combobox
TOP.combo.comboBoxVerifier, // a combobox
{
xtype : 'textarea',
fieldLabel : TOP.manageTasksDistributedBatch.modify.field.comment,
name : TOP.manageTasksDistributedBatch.modify.field.comment,
id : 'input.text.comment',
height : 70
}];

TOP.panel.changeTask = new Ext.FormPanel({
id : 'west-panel',
labelWidth : 60,
title : 'Task detail',
frame : true,
width : 290,
height : 220,
enableDD : true,
ddGroup : "treeDD",
margins : '0 0 0 0',
collapseMode : 'mini',
defaults : {
width : 190
},
defaultType : 'textfield',
items : items



When I run this code :


var vals = TOP.panel.changeTask.getForm().getValues();


vals does not contains the disabled field :


Medley

evant
24 Sep 2008, 3:16 AM
This is the intended behaviour, it's how HTML forms work too.