public static function searchForm($action, $method = 'post', $htmlOptions = array())
    {
        self::addCssClass('form-search', $htmlOptions);
        $inputOptions = TbArray::popValue('inputOptions', $htmlOptions, array());
        $inputOptions = TbArray::merge(array('type' => 'text', 'placeholder' => 'Search'), $inputOptions);
        $name = TbArray::popValue('name', $inputOptions, 'search');
        $value = TbArray::popValue('value', $inputOptions, '');
        $output = self::beginFormTb(self::FORM_LAYOUT_SEARCH, $action, $method, $htmlOptions);
        $output .= self::searchQueryField($name, $value, $inputOptions);
        $output .= parent::endForm();
        return $output;
    }
public static function searchForm($action, $method = 'post', $htmlOptions = array())
    {
        self::addCssClass('form-search', $htmlOptions);
        $inputOptions = TbArray::popValue('inputOptions', $htmlOptions, array());
        $inputOptions = TbArray::merge(array('type' => 'text', 'placeholder' => 'Search'), $inputOptions);
        $name = TbArray::popValue('name', $inputOptions, 'search');
        $value = TbArray::popValue('value', $inputOptions, '');
        $output = self::beginFormTb(self::FORM_LAYOUT_SEARCH, $action, $method, $htmlOptions);
        $output .= self::searchQueryField($name, $value, $inputOptions);
        $output .= parent::endForm();
        return $output;
    }
public static function searchForm ( $ action , $ method = 'post' , $ htmlOptions = array ( ) ) { self :: addCssClass ( 'form-search' , $ htmlOptions ) ; $ inputOptions = TbArray :: popValue ( 'inputOptions' , $ htmlOptions , array ( ) ) ; $ inputOptions = TbArray :: merge ( array ( 'type' => 'text' , 'placeholder' => 'Search' ) , $ inputOptions ) ; $ name = TbArray :: popValue ( 'name' , $ inputOptions , 'search' ) ; $ value = TbArray :: popValue ( 'value' , $ inputOptions , '' ) ; $ output = self :: beginFormTb ( self :: FORM_LAYOUT_SEARCH , $ action , $ method , $ htmlOptions ) ; $ output .= self :: searchQueryField ( $ name , $ value , $ inputOptions ) ; $ output .= parent :: endForm ( ) ; return $ output ; }
Generates a search form.
@param mixed $action the form action URL.
@param string $method form method (e.g. post, get).
@param array $htmlOptions additional HTML options.
@return string the generated form.
Generates a search form .