Example #1
0
    \$("#{$input_id}").bind("propertychanged", search_input_changed);
    rhoone.search.keywords = \$.trim(\$("#{$input_id}").val());
    if (rhoone.search.keywords !== "") {
        \$("title").html("Search: " + html_encode(rhoone.search.keywords));
    }
    \$(document).bind("rhoone:search_start", function(e) {
        \$("title").html("Search: " + html_encode(rhoone.search.keywords));
    });
    \$("#{$input_id}").focus();
    
EOT;
$this->registerJs($js);
$form = ActiveForm::begin($formConfig);
/* @var $form yii\widgets\ActiveForm */
?>
<div class="form-group form-group-search">
    <?php 
echo $form->field($model, 'keywords', ['template' => '{input}'])->textInput($inputConfig);
?>
    <?php 
/**
 * @todo Translation to other languages.
 * We need everyone's help.
 */
?>
    <?php 
echo Html::submitButton(FormWidget::t('Search'), $submitConfig);
?>
</div>
<?php 
ActiveForm::end();