本文整理汇总了PHP中app\models\Authors::dropDownList方法的典型用法代码示例。如果您正苦于以下问题:PHP Authors::dropDownList方法的具体用法?PHP Authors::dropDownList怎么用?PHP Authors::dropDownList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Authors
的用法示例。
在下文中一共展示了Authors::dropDownList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: date
?>
" style="width: 100px;"/>
<?php
}
?>
<?php
echo $form->field($model, 'preview')->fileInput([])->label('Превью');
?>
<!-- --><?php
/*= $form->field($model, 'author_id')->textInput() */
?>
<?php
echo $form->field($model, 'author_id', ['options' => []])->dropDownList(Authors::dropDownList(), ['empty' => '(Select a Author)'])->label('Автор');
?>
<div style="position: relative;">
<?php
echo $form->field($model, 'date')->textInput(['class' => 'form-control bdi', 'value' => date('d/m/Y', strtotime($model->date))]);
?>
</div>
<?php
/*= $form->field($model, 'date')->input('date', ['class' => 'bootstrap-date'])->label('Дата выхода книги') */
?>
<?php
/*= $form->field($model, 'date_create')->textInput(['disabled' => 'disabled'])->label('Дата добавления') */
?>
<div style="position: relative;">
示例2:
<div class="books-search">
<?php
$form = ActiveForm::begin(['action' => ['index'], 'method' => 'get']);
?>
<?php
/*= $form->field($model, 'id') */
?>
<?php
/*= $form->field($model, 'author_id') */
?>
<?php
echo $form->field($model, 'author_id', ['options' => ['style' => 'width: 25%; display: inline-block; float: left; margin-right: 20px;']])->dropDownList(Authors::dropDownList(true), ['empty' => '(Select a Author)']);
?>
<?php
echo $form->field($model, 'name', ['options' => ['style' => 'width: 25%; display: inline-block; float: left;']])->textInput();
?>
<div style="clear: both;"></div>
<?php
/*= $form->field($model, 'preview') */
?>
<div class="form-group field-bookssearch-date">
<label class="control-label" for="bookssearch-date">Дата выхода книги</label>
<div style="clear: both;"></div>
<div style="position: relative; width: 150px; display: inline-block; float: left; margin-right: 20px;">
<input id="bookssearch-date" class="form-control bdi" type="text" name="BooksSearch[date_start]" placeholder="Начальная дата" value="<?php