src/Cornford/Bootstrapper/BootstrapBase.php
protected function input($type = 'text', $name, $label = null, $value = null, $errors = null, array $options = array(), array $parameters = array())
	{
		$return = '';
		$options = array_merge(array('class' => 'form-control', 'placeholder' => $label, 'id' => $name), $options);
		$containerAttributes = $this->getContainerAttributes($options);
		$labelAttributes = $this->getLabelAttributes($options);

		if (!isset($containerAttributes['display'])) {
			$return .= $this->group($name, $errors, 'form-group', $containerAttributes);
		}

		if ($type != 'search') {
			$return .= $this->label($name, $label, $labelAttributes);
		}

		if ($value === null) {
			$value = $this->input->get($name);
		}

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

		switch ($type) {
			case 'datetime':
			case 'date':
			case 'time':
					if (isset($parameters['displayIcon']) && !$parameters['displayIcon']) {
						unset($parameters['displayIcon']);
						$return .= $this->form->text($name, $value, $options);
					} else {
						$return .= '<div id="' . $name . '_' . $type .  '" class="input-group ' . $type . '">';
						$return .= $this->form->text($name, $value, $options);
						$return .= '<span class="input-group-addon">' . "\n" . '<span class="glyphicon glyphicon-' . ($type == 'time' ? 'time' : 'calendar')  . '"></span>' . "\n" . '</span>' . "\n" . '</div>' . "\n";
					}

					$return .= '<script type="text/javascript">$(function() { $("#' . $name . ', #' . $name . '_' . $type . '").datetimepicker({ ';

					switch ($type) {
						case 'time':
							$return .= 'pickDate: false, ';
							break;
						case 'date':
							$return .= 'pickTime: false, ';
							break;
						case 'datetime':
						default:
					}

					$return .= implode(', ', array_map(function ($value, $key) { return $key . ': "' . $value . '"'; }, $parameters, array_keys($parameters)));
					$return = rtrim($return, ', ');
					$return .= ' }); });</script>' . "\n";
				break;
			case 'password':
			case 'file':
				unset($options['placeholder']);
				$return .= $this->form->$type($name, $options) . "\n";
				break;
			case 'search':
				$return .= '<div class="input-group">' . "\n";
				$return .= $this->form->input('search', $name, $value, $options) . "\n";
				$return .= '<div class="input-group-btn">' . "\n";
				$return .= '<button class="btn btn-default" type="submit"><span class="glyphicon glyphicon-search"></span></button>' . "\n";
				$return .= '</div>' . "\n";
				$return .= '</div>' . "\n";
				break;
			case 'telephone':
				$return .= $this->form->input('tel', $name, $value, $options) . "\n";
				break;
			case 'range':
				$return .= '<div class="input-group">' . "\n";
				$return .= '<div class="form-control">' . "\n";
				$return .= $this->form->input('range', $name, $value, array_merge($options, array('class' => '', 'onchange' => $name . 'value.value=value', 'oninput' => $name . 'value.value=value'))) . "\n";
				$return .= '</div>' . "\n";
				$return .= '<output id="' . $name . 'value" class="input-group-addon">0</output>' . "\n";
				$return .= '</div>' . "\n";
				break;
			case 'text':
			case 'hidden':
			case 'email':
			case 'textarea':
				$return .= $this->form->$type($name, $value, $options) . "\n";
				break;
			default:
				$return .= $this->form->input($type, $name, $value, $options) . "\n";
		}

		$return .= $this->errors($name, $errors);

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

		if (!isset($containerAttributes['display'])) {
			$return .= '</div>' . "\n";
		}

		return $return;
	}
protected function input($type = 'text', $name, $label = null, $value = null, $errors = null, array $options = array(), array $parameters = array())
	{
		$return = '';
		$options = array_merge(array('class' => 'form-control', 'placeholder' => $label, 'id' => $name), $options);
		$containerAttributes = $this->getContainerAttributes($options);
		$labelAttributes = $this->getLabelAttributes($options);

		if (!isset($containerAttributes['display'])) {
			$return .= $this->group($name, $errors, 'form-group', $containerAttributes);
		}

		if ($type != 'search') {
			$return .= $this->label($name, $label, $labelAttributes);
		}

		if ($value === null) {
			$value = $this->input->get($name);
		}

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

		switch ($type) {
			case 'datetime':
			case 'date':
			case 'time':
					if (isset($parameters['displayIcon']) && !$parameters['displayIcon']) {
						unset($parameters['displayIcon']);
						$return .= $this->form->text($name, $value, $options);
					} else {
						$return .= '<div id="' . $name . '_' . $type .  '" class="input-group ' . $type . '">';
						$return .= $this->form->text($name, $value, $options);
						$return .= '<span class="input-group-addon">' . "\n" . '<span class="glyphicon glyphicon-' . ($type == 'time' ? 'time' : 'calendar')  . '"></span>' . "\n" . '</span>' . "\n" . '</div>' . "\n";
					}

					$return .= '<script type="text/javascript">$(function() { $("#' . $name . ', #' . $name . '_' . $type . '").datetimepicker({ ';

					switch ($type) {
						case 'time':
							$return .= 'pickDate: false, ';
							break;
						case 'date':
							$return .= 'pickTime: false, ';
							break;
						case 'datetime':
						default:
					}

					$return .= implode(', ', array_map(function ($value, $key) { return $key . ': "' . $value . '"'; }, $parameters, array_keys($parameters)));
					$return = rtrim($return, ', ');
					$return .= ' }); });</script>' . "\n";
				break;
			case 'password':
			case 'file':
				unset($options['placeholder']);
				$return .= $this->form->$type($name, $options) . "\n";
				break;
			case 'search':
				$return .= '<div class="input-group">' . "\n";
				$return .= $this->form->input('search', $name, $value, $options) . "\n";
				$return .= '<div class="input-group-btn">' . "\n";
				$return .= '<button class="btn btn-default" type="submit"><span class="glyphicon glyphicon-search"></span></button>' . "\n";
				$return .= '</div>' . "\n";
				$return .= '</div>' . "\n";
				break;
			case 'telephone':
				$return .= $this->form->input('tel', $name, $value, $options) . "\n";
				break;
			case 'range':
				$return .= '<div class="input-group">' . "\n";
				$return .= '<div class="form-control">' . "\n";
				$return .= $this->form->input('range', $name, $value, array_merge($options, array('class' => '', 'onchange' => $name . 'value.value=value', 'oninput' => $name . 'value.value=value'))) . "\n";
				$return .= '</div>' . "\n";
				$return .= '<output id="' . $name . 'value" class="input-group-addon">0</output>' . "\n";
				$return .= '</div>' . "\n";
				break;
			case 'text':
			case 'hidden':
			case 'email':
			case 'textarea':
				$return .= $this->form->$type($name, $value, $options) . "\n";
				break;
			default:
				$return .= $this->form->input($type, $name, $value, $options) . "\n";
		}

		$return .= $this->errors($name, $errors);

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

		if (!isset($containerAttributes['display'])) {
			$return .= '</div>' . "\n";
		}

		return $return;
	}
Create a form input field.

@param string                         $type
@param string                         $name
@param string                         $value
@param string                         $label
@param \Illuminate\Support\MessageBag $errors
@param array                          $options
@param array                          $parameters

@return string