本文整理匯總了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