<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use backend\models\Book;
use yii\helpers\ArrayHelper;
use yii\widgets\FileInput;

/* @var $this yii\web\View */
/* @var $model backend\models\BookMark */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="book-mark-form">

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

    <?=
        $form->field($model, 'bookId')->dropDownList(ArrayHelper::map(Book::find()->all(), 'id', 'title'),array('prompt'=>'Select Book'))
    ?>

    <?= $form->field($model, 'chapterIndex')->textInput() ?>

    <?=
        $form->field($model, 'chapterId')->dropDownList(ArrayHelper::map(\backend\models\Chapter::find()->all(), 'id', 'title'),array('prompt'=>'Select Chapter'))
    ?>

    <?= $form->field($model, 'quotePosition')->textInput() ?>

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

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

</div>
