<?= $form->field( $model, 'imageFile')->fileInput() ?>
to allow a user to input a file, which is working fine when a file hasn’t previously been chosen.
However if a user is to try to update their file after it has already been chosen, I am trying to get rid of the ‘No file chosen’ that appears to the right of the ‘choose file’ button, and instead have it display the name of the file.
I have already tried to set the value of the ‘imageFile’ like you are able to do with normal textInputs. It seems that this doesn’t work for fileInput() though.
<?= $form->field( $model, 'imageFile', ['inputOptions' => ['value' => $model->imageFile]])->fileInput() ?>
Anybody know of a solution?