When I include if condition in update form I'm getting blank page. Otherwise without if condition update works fine.
_form.php without if condition (this works fine)
<?= $form->field($model, 'certified')->radioList(['y'=>'YES', 'n'=>'NO']) ?>
<div class="row">
<div class="row">
<?= $form->field($modelcertificate, 'description')->dropDownList(
ArrayHelper::map(CertificateDescription::find()->all(),'description','description'),
[ 'prompt'=>'select desc',
]); ?>
</div>
<div class="row">
<?= $form->field($modelqm, 'q1')->textInput(['maxlength' => true]) ?>
</div>
</div>
For the same if I include If condition, after hitting update button blank page will be shown.
_form.php with if condition ( leads to blank page)
<?= $form->field($model, 'certified')->radioList(['y'=>'YES', 'n'=>'NO']) ?>
<div class="row">
<?php if ($model->certified == 'y') : ?>
<div class="row">
<?= $form->field($modelcertificate, 'description')->dropDownList(
ArrayHelper::map(CertificateDescription::find()->all(),'description','description'),
['prompt'=>'select desc', ]); ?>
</div>
<?php else: ?>
<div class="row">
<?= $form->field($modelqm, 'q1')->textInput(['maxlength' => true]) ?>
</div>
<?php endif; ?>
</div>