src/Cornford/Bootstrapper/BootstrapBase.php
protected function field($type, $name, $label = null, $value = null, $checked = null, array $options = array())
	{
		$return = '';
		$options = array_merge(array('id' => $name), $options);
		$containerAttributes = $this->getContainerAttributes($options);
		$labelAttributes = $this->getLabelAttributes($options);

		if ($this->formType != self::FORM_INLINE && !isset($containerAttributes['display'])) {
			$return .= $this->group($name, null, 'form-group', $containerAttributes);
		}

		if ($this->formType == self::FORM_HORIZONTAL) {
			$return .= $this->group('', null, $this->inputClass);
		}

		$return .= '<div class="' . $type . '">' . "\n";
		$return .= $this->label($name, $label, $labelAttributes, $this->form->$type($name, $value, $checked, $options));
		$return .= '</div>' . "\n";

		if ($this->formType == self::FORM_HORIZONTAL) {
			$return .= '</div>' . "\n";
		}

		if ($this->formType != self::FORM_INLINE && !isset($containerAttributes['display'])) {
			$return .= '</div>';
		}

		return $return;
	}
protected function field($type, $name, $label = null, $value = null, $checked = null, array $options = array())
	{
		$return = '';
		$options = array_merge(array('id' => $name), $options);
		$containerAttributes = $this->getContainerAttributes($options);
		$labelAttributes = $this->getLabelAttributes($options);

		if ($this->formType != self::FORM_INLINE && !isset($containerAttributes['display'])) {
			$return .= $this->group($name, null, 'form-group', $containerAttributes);
		}

		if ($this->formType == self::FORM_HORIZONTAL) {
			$return .= $this->group('', null, $this->inputClass);
		}

		$return .= '<div class="' . $type . '">' . "\n";
		$return .= $this->label($name, $label, $labelAttributes, $this->form->$type($name, $value, $checked, $options));
		$return .= '</div>' . "\n";

		if ($this->formType == self::FORM_HORIZONTAL) {
			$return .= '</div>' . "\n";
		}

		if ($this->formType != self::FORM_INLINE && !isset($containerAttributes['display'])) {
			$return .= '</div>';
		}

		return $return;
	}
Create a form field.

@param string $type
@param string $name
@param string $label
@param string $value
@param string $checked
@param array  $options

@return string