I have a custom form type that defines some default attr
options:
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'invalid_message' => 'The selected image does not exist',
'attr'=>array(
'data-image-picker'=>'true',
'data-label'=>'Pick Image'
),
));
}
However when i use this custom form type the entire attr
array is replaced with what is defined.
$builder->add('logo','image_picker',array(
'attr'=>array(
'data-label'=>'Logo'
),
));
When the form is rendered it only has <input data-label="Logo" ...>
How do i get it so that those options will be merged not completly overridden?