PDA

View Full Version : Ext.ux.form.BoolCheckbox - checkbox that also returns value when unticked



conorarmstrong
4 May 2011, 5:47 PM
A good while back, Saki did a special type of check box (Ext.ux.form.XCheckbox (http://www.sencha.com/forum/showthread.php?25924-XCheckbox-A-nicer-checkbox-always-submitting-configurable-values)) that also returned a value on submit when the box was unticked. As written however, it didn't work with ExtJS v4 - I think it was orig written for v2

[EDITED]

As pointed out by atian25 the equivalent can be achieved in v4 with:



field: {
xtype: 'checkboxfield',
inputValue: 'true',
uncheckedValue: 'false',
boxLabel: 'Enable'
}

atian25
4 May 2011, 10:50 PM
it seems that extjs4 had done this:


field: {
xtype: 'checkboxfield',
inputValue: 'true',
uncheckedValue: 'false',
boxLabel: 'Enable'
}

conorarmstrong
5 May 2011, 12:48 AM
well spotted. totally missed that one