So I am fiddling with the Yii Framework and in one of the views, specifically the create form, I am trying to give one of my textfields a default value. Therefore when I go onto
It works on my end:
<?= $form->field($model, 'some_field')->textInput(['readonly' => true, 'value' => $model->isNewRecord ? 'Your Value' : $model->some_field]) ?>