Beispiel #1
0
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use app\models\Event;
/* @var $this yii\web\View */
/* @var $model app\models\TicketGroup */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="ticket-group-form">

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

    <?php 
echo $form->field($model, 'event_id')->dropDownList(Event::getList());
?>

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'ticket_limit')->textInput();
?>

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