PDA

View Full Version : checkboxfield is always true



Dmoney
13 Nov 2012, 12:39 PM
I have a form with checkboxfields. the form is filled by using loadRecord() and saved by using record.set(values);

but the checked value never changes. if I change it manually in the database than the record will show up unchecked in the form. but whenever I submit the form it always submits as true. how do I get the unchecked value to update in the record?



, {
xtype: 'checkboxfield',
name: 'display',
id: 'display',
fieldLabel: 'Display',
inputValue: 'true',
boxLabel: 'Displayed Online'
}

vietits
13 Nov 2012, 6:35 PM
Try to config your checkbox fields with uncheckedValue.


, {
xtype: 'checkboxfield',
name: 'display',
id: 'display',
fieldLabel: 'Display',
inputValue: 'true',
uncheckedValue: 'false',
boxLabel: 'Displayed Online'
}

Dmoney
13 Nov 2012, 7:45 PM
thanks! @vietits

that was the problem, everything is working as expected now.