protected function getInput()
	{
		// Initialize some field attributes.
		$class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
		$disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';
		$value = $this->element['value'] ? (string) $this->element['value'] : '1';

		if (empty($this->value))
		{
			$checked = (isset($this->element['checked'] )) ? ' checked="checked"' : '';
		}
		else
		{
			$checked = ' checked="checked"';
		}

		// Initialize JavaScript field attributes.
		$onclick = $this->element['onclick'] ? ' onclick="' . (string) $this->element['onclick'] . '"' : '';

		return '<input type="checkbox" name="' . $this->name . '" id="' . $this->id . '"' . ' value="'
			. htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '"' . $class . $checked . $disabled . $onclick . ' />';
	}
protected function getInput()
	{
		// Initialize some field attributes.
		$class = $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';
		$disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';
		$value = $this->element['value'] ? (string) $this->element['value'] : '1';

		if (empty($this->value))
		{
			$checked = (isset($this->element['checked'] )) ? ' checked="checked"' : '';
		}
		else
		{
			$checked = ' checked="checked"';
		}

		// Initialize JavaScript field attributes.
		$onclick = $this->element['onclick'] ? ' onclick="' . (string) $this->element['onclick'] . '"' : '';

		return '<input type="checkbox" name="' . $this->name . '" id="' . $this->id . '"' . ' value="'
			. htmlspecialchars($value, ENT_COMPAT, 'UTF-8') . '"' . $class . $checked . $disabled . $onclick . ' />';
	}
protected function getInput ( ) { // Initialize some field attributes. $ class = $ this -> element [ 'class' ] ? ' class="' . ( string ) $ this -> element [ 'class' ] . '"' : '' ; $ disabled = ( ( string ) $ this -> element [ 'disabled' ] == 'true' ) ? ' disabled="disabled"' : '' ; $ value = $ this -> element [ 'value' ] ? ( string ) $ this -> element [ 'value' ] : '1' ; if ( empty ( $ this -> value ) ) { $ checked = ( isset ( $ this -> element [ 'checked' ] ) ) ? ' checked="checked"' : '' ; } else { $ checked = ' checked="checked"' ; } // Initialize JavaScript field attributes. $ onclick = $ this -> element [ 'onclick' ] ? ' onclick="' . ( string ) $ this -> element [ 'onclick' ] . '"' : '' ; return '<input type="checkbox" name="' . $ this -> name . '" id="' . $ this -> id . '"' . ' value="' . htmlspecialchars ( $ value , ENT_COMPAT , 'UTF-8' ) . '"' . $ class . $ checked . $ disabled . $ onclick . ' />' ; }
Method to get the field input markup.
The checked element sets the field to selected.

@return  string   The field input markup.

@since   1.0
Method to get the field input markup . The checked element sets the field to selected .