Closed
Description
Symfony version(s) affected: x4.2.7
Description
The bootstrap file input field is visible but has no text in it.
But if I add
.custom-file-input {
opacity: 1!important;
}
The text is visible but the ugly button is too.
How to reproduce
I am using the bootstrap 4 template.
#config/packages/twig.yaml
twig:
paths: ['%kernel.project_dir%/templates']
debug: '%kernel.debug%'
strict_variables: '%kernel.debug%'
form_themes: ['bootstrap_4_layout.html.twig']
Generating the form like so :
$builder->add(
'datafile',
FileType::class,
[
'label' => 'main.form.file',
]
);
And displaying it like so :
<div class="col-md-12 col-lg-6" id="main-form-holder">
<div class="row form-group">
<div class="col-md-3">{{ form_label(form.datafile) }}</div>
<div class="col-md-9">{{ form_widget(form.datafile) }}</div>
</div>
</div>
This problem appeared after updating from Symfony 4.0 to symfony 4.2 .