use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\helpers\Render;
use common\models\Author;
/* @var $this yii\web\View */
/* @var $model frontend\models\BookSearch */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="book-search">

    <?php 
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']);
?>
    <?php 
$render = new Render($form, $model);
?>

    <div class="row">
        <div class="col-md-6">
            <?php 
echo $render->selectField('author_id', Author::getList());
?>
        </div>

        <div class="col-md-6">
            <?php 
echo $form->field($model, 'name');
?>
        </div>
Beispiel #2
0
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\helpers\Render;
use common\models\Author;
/* @var $this yii\web\View */
/* @var $model common\models\Book */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="book-form">

    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>
    <?php 
$render = new Render($form, $model);
?>

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $render->selectField('author_id', Author::getList());
?>

    <?php 
echo $render->dateField('date');
?>