I’ve currently implemented the following hack to remove fields from the form if you are creating a new record:
<php
$render = null;
if($model->isNewRecord){
$render = function($val){};
}
?>
<?= $form->field($model, 'description')->textInput(['maxlength' => 255])->render($render) ?>
Does anyone know of an actual built-in way to do this within the ActiveForm/Field codebase?