Implements alternative input types as method calls against `Form` helper. Enables the generation of HTML5 input types and other custom input types:
{{{ // Creates an HTML5 'range' input slider: $range = $this->form->range('completion', array('min' => 0, 'max' => 100)); }}}

Parameters

  • string $type The method called, which represents the `type` attribute of the `<input />` tag.
  • array $params An array of method parameters passed to the method call. The first element should be the name of the input field, and the second should be an array of element attributes.

Returns

string Returns an `<input />` tag of the type specified in `$type`.

Source

						public function __call($type, array $params = array()) {
		$params += array(null, array());
		list($name, $options) = $params;
		list($name, $options, $template) = $this->_defaults($type, $name, $options);
		$template = $this->_context->strings($template) ? $template : 'input';
		return $this->_render($type, $template, compact('type', 'name', 'options', 'value'));
	}