element = array_merge([ "class" => "js-icheck", "name" => $this->name, "id" => "field_" . $this->name, "binary" => true ], $this->element); // We add the check status instead of the value if ($this->element["binary"] !== false && $this->getValue() == 1) { $this->element["checked"] = "checked"; } } }