{ xtype: 'checkbox' ,fieldLabel: _('active') ,name: 'active' ,inputValue: '1' }
$active = $modx->getOption('active',$scriptProperties,0);
Yes, we added an xtype: ’xcheckbox’ that behaves exactly like a normal checkbox, except it sends 0 if unchecked.
I thought when browsing the code of 2.1-rc4 the other day there was some extension there that would force 0 to be sent when not checked, but not 100% sure on that. Was looking for something else.
Doc-i-fied to make sure it doesn’t get lost in the forum: http://rtfm.modx.com/display/revolution20/MODExt#MODExt-xcheckbox
Quote from: Mark at May 24, 2011, 12:45 PMYes, we added an xtype: ’xcheckbox’ that behaves exactly like a normal checkbox, except it sends 0 if unchecked.
I thought when browsing the code of 2.1-rc4 the other day there was some extension there that would force 0 to be sent when not checked, but not 100% sure on that. Was looking for something else.
Quote from: splittingred at May 24, 2011, 12:48 PM
Doc-i-fied to make sure it doesn't get lost in the forum: http://rtfm.modx.com/display/revolution20/MODExt#MODExt-xcheckbox
Very nice, just got stuck on this too and xcheckbox saved my bacon. No seriously, I'm cooking bacon right now.