_form.php
963 Bytes
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\models\Hotel */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="hotel-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'photo')->textInput(['maxlength' => 255]) ?>
<?= $form->field($model, 'name')->textInput(['maxlength' => 255]) ?>
<?= $form->field($model, 'address')->textInput(['maxlength' => 255]) ?>
<?= $form->field($model, 'price')->textInput(['maxlength' => 255]) ?>
<?= $form->field($model, 'distance')->textInput(['maxlength' => 255]) ?>
<?= $form->field($model, 'rating')->textInput() ?>
<?= $form->field($model, 'spot_id')->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>