I have an activeform field.
<?= $form->field($model, 'featured_listings')->dropDownList([1=>'Yes',0=>'No']); ?>
I need this field hidden on create and shown on update.
Add if()
statement which uses $model->isNewRecord
:
if($model->isNewRecord) {
//do your stuff here
}
Or if you want to have just HTML hidden, add proper class by $model->isNewRecord ? 'hidden' : ''