Assigning css to a class in branch form

I am a beginner developer. in symfony 2 and twig and I would like to add bootstrap combobox https://github.com/danielfarrell/bootstrap-combobox/ which I found on the net. I want to add this combobox to my branch template. However, as written here:

<select class="combobox">
  <option></option>
  <option value="PA">Pennsylvania</option>
  <option value="CT">Connecticut</option>
  <option value="NY">New York</option>
  <option value="MD">Maryland</option>
  <option value="VA">Virginia</option>
</select>

      

using base values ​​from css ... but what I want to do is enumerate:

 {{ form_row(form.city) }}

      

it's in the combobox ...

as an additional example written: http://symfony.com/doc/current/cookbook/form/form_customization.html#method-2-inside-a-separate-template

Clear help would be appreciated!

+3


source to share


1 answer


{{ form_row(form.city, {'attr': {'class': 'class-name'}}) }}

      

or



{{ form_widget(form.city, {'attr': {'class': 'class-name'}}) }}

      

+3


source







All Articles