Example #1
0
echo $form->field($model, 'description')->textInput(['maxlength' => 255]);
?>

    <?php 
echo $form->field($model, 'event_type')->dropDownList(Event::getLocalizedConstants('TYPE_'));
?>

    <?php 
echo $form->field($model, 'event_start')->widget(DateTimePicker::classname(), ['pluginOptions' => ['format' => 'yyyy-mm-dd hh:ii:ss', 'todayHighlight' => true]]);
?>

    <?php 
echo $form->field($model, 'event_end')->widget(DateTimePicker::classname(), ['pluginOptions' => ['format' => 'yyyy-mm-dd hh:ii:ss', 'todayHighlight' => true]]);
?>

    <?php 
echo $form->field($model, 'status')->dropDownList(Event::getLocalizedConstants('STATUS_'));
?>

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

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

</div>