__('Checkbox', __FILE__), // Module Title 'summary' => __('Single checkbox toggle', __FILE__), // Module Summary 'version' => 101, 'permanent' => true, ); } const checkedValueDefault = 1; const uncheckedValueDefault = ''; /** * True if the $checkedValue set manually (and should be used as a label), false if it was inherited from $value attribute * */ protected $checkedValueIsLabel = false; public function __construct() { $this->set('checkedValue', self::checkedValueDefault); $this->checkedValueIsLabel = false; // cancel line above $this->set('uncheckedValue', self::uncheckedValueDefault); $this->set('label2', ''); // alternate label for checkbox only // when autocheck set to 1, setting the value attribute to non-zero automatically triggered checked=checked attribute $this->set('autocheck', 0); parent::__construct(); } public function init() { parent::init(); $this->attr('checked', ''); //$this->set('skipLabel', Inputfield::skipLabelFor); // tell InputfieldWrapper not to use a 'for' attribute with it's autogen'd