Good all the time of day. I customize a form that is automatically generated using a CRUD generator. I try to put down css styles for the elements added to the form, and generally make it look more decently. Here are the parameters that I feed to the form constructor:
public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('name') ->add('description') ->add('timeStart', null, ['attr' => [ 'data-style'=>"btn-success", 'class' => 'selectpicker' ] ] ) ->add('timeEnd', null, ['attr' => [ 'data-style'=>"btn-danger", 'class' => 'selectpicker' ] ] ) ->add('parentlist', null, ['attr' => [ 'data-style'=>"btn-primary", 'class' => 'selectpicker' ]] ); } The parentlist field is a simple select box that selects the list to which the task belongs. To him, I easily put down the class .selectpicker and the bootstrap plug-in picked it up and reworked it into a beautiful one. And for the timeStart and timeEnd fields is the DateTimeType widget type, and accordingly, the select boxes are added by other separate widgets. And accordingly, when I add the .selectpicker class to these fields, this class goes not to selectboxes, like parentlist, but to the div that unites them all. What should I do to customize select boxes on a regular DateTimeType widget? Maybe for widgets of fields you can edit templates from which they are rendered?