A
A
Araik2020-07-16 07:30:49
HTML
Araik, 2020-07-16 07:30:49

Why doesn't the placeholder in the input change to the file name after selecting a file?

Hello everyone,

Using Bootstrap 4.5, I have a form that has an input to upload images.

<div class="form-group col-md-10">
                        <label for="statusPhoto">текст</label>
                        <div class="custom-file" lang="<?=$user_lang?>">
                            <input type="file" class="custom-file-input" name='statusPhoto' id="statusPhoto">
                            <label class="custom-file-label" for="statusPhoto">Выбрать фото для загрузки</label>
                        </div>
                        <small class="form-text text-muted">текст</small>
                    </div>


Why doesn't the label change its value to the file name when selecting a file? As far as I understand this action by default, judging by the dock ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Khegay, 2020-07-16
@NinjaNickName

The documentation says:

The recommended plugin to animate custom file input is bs-custom-file-input , which is what we currently use here in our docs.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question