I have problem with file clear value. When submitting the form fails due to validation errors, the form type that have files (subtitle and watermark) are cleared and have to be selected again, but other type like text still keep value. It should remain in the same state as before trying to submit the form.
Bellow is my form type code:
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add(
'newName',
'text',
[
'mapped' => false,
'required' => false,
]
)
->add('subtitleFile', 'file')
->add('watermarkFile', 'file')
->add(
'xAxis',
'text',
[
'mapped' => false,
'required' => false,
]
)
->add(
'yAxis',
'text',
[
'mapped' => false,
'required' => false,
]
)
->add('start', 'submit');
}