public function input($type, $name, $value = '', $attributes = array())
    {
        $id = str_replace(array('[', ']'), array('_', ''), $name);

        return $this->tag('input', null)
                    ->set(array('type' => $type, 'value' => $value, 'name' => $name, 'id' => $id))
                    ->set($attributes);
    }