Esempio n. 1
0
<div class="kitaponeri-form">

    <?php 
$form = ActiveForm::begin();
?>

    

    <?php 
echo $form->field($model, 'kitap_id')->dropDownList(ArrayHelper::map(Kitaplar::find()->all(), 'kitap_id', 'kitap_adi'), ['prompt' => 'Kitap Seçiniz..']);
?>


    <?php 
echo $form->field($model, 'user_id')->dropDownList(ArrayHelper::map(User::find()->all(), 'id', 'username'), ['prompt' => 'Kullanıcı Seçiniz..']);
?>


    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Öner' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>