TbHtml::navbarSearchForm PHP Method

navbarSearchForm() public static method

Generates a navbar search form.
public static navbarSearchForm ( mixed $action, string $method = 'post', array $htmlOptions = [] ) : string
$action mixed the form action URL.
$method string form method (e.g. post, get).
$htmlOptions array additional HTML attributes
return string the generated form.
    public static function navbarSearchForm($action, $method = 'post', $htmlOptions = array())
    {
        self::addCssClass('navbar-form', $htmlOptions);
        return self::searchForm($action, $method, $htmlOptions);
    }

Usage Example

Example #1
0
            'items' => array(
                array('label' => 'Home', 'url' => '#', 'active' => true),
                array('label' => 'Link', 'url' => '#'),
                array('label' => 'Link', 'url' => '#'),
            ),
        ),
    ),
)); ?></pre>

	<hr class="bs-docs-separator">

	<h3>Search form</h3>

	<div class="bs-docs-example">
		<?php 
$this->widget('bootstrap.widgets.TbNavbar', array('brandLabel' => 'Title', 'items' => array(TbHtml::navbarSearchForm('#'))));
?>
	</div>

	<pre class="prettyprint linenums">
&lt;?php $this->widget('bootstrap.widgets.TbNavbar', array(
    'brandLabel' => 'Title',
    'items' => array(
        TbHtml::navbarSearchForm('#'),
    ),
));</pre>

	<hr class="bs-docs-separator">

	<h2>Optional display variations</h2>
All Usage Examples Of TbHtml::navbarSearchForm
TbHtml