1

A client doesn't want to scroll in a select form so I need to increase the size of my select form.

I tried this but still doesn't work, I only see 4 inputs :

{{ form_widget(filterForm.accomodationFilter1, { attr: { class: 'fancyselect filter type' }, {'size': '10'} }) }}

Any idea how I can do that and where is the documentation ?

Thanks

Dimitri Danilov
  • 1,338
  • 1
  • 17
  • 45

1 Answers1

1

Try doing it directly in the formBuilder:

->add('example', 'choice', array(
            'attr' => array('class' => 'fancyselect filter type',
                             'style' => 'max-width:100px'),
            'choices' => 'choices',
            )

Or just use:

->add('example', 'choice', array(
            'attr' => array('class' => 'fancyselect filter type'),
            'choices' => 'choices',
            'max_length' => 100,
            )
Besbes Riadh
  • 811
  • 2
  • 10
  • 23