Last active
October 2, 2015 09:42
-
-
Save evercode1/7985ba8bfcd58cfb8b3c to your computer and use it in GitHub Desktop.
form partial profile chap 8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| use yii\helpers\Html; | |
| use yii\widgets\ActiveForm; | |
| /** | |
| * @var yii\web\View $this | |
| * @var app\models\Profile $model | |
| * @var yii\widgets\ActiveForm $form | |
| */ | |
| ?> | |
| <div class="profile-form"> | |
| <?php $form = ActiveForm::begin(); ?> | |
| <?= $form->field($model, 'first_name')->textInput(['maxlength' => 45]) ?> | |
| <?= $form->field($model, 'last_name')->textInput(['maxlength' => 45]) ?> | |
| <br> | |
| <?= $form->field($model, 'birthdate')->textInput() ?> | |
| * please use YYYY-MM-DD format | |
| <br> | |
| <?= $form->field($model, 'gender_id')->dropDownList($model->genderList, ['prompt' => 'Please Choose One' ]);?> | |
| <div class="form-group"> | |
| <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', | |
| ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> | |
| </div> | |
| <?php ActiveForm::end(); ?> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment