php - Symfony/Twig radio style formbuilder -


i need style each of radio button using symfony form builder.

this part of createformbuilder:

->add('categoryid', 'entity', array(                 'class' => 'mybundle:category',                 'property' => 'name',                 'required' => false,                 'expanded' => true )) 

and in twig template:

{% child in form.categoryid %}     <div class="radio i-checks col-md-3">         <label>{{ form_widget(child, {'attr': { 'class': '', 'value': '' } }) }} </label>     </div> {% endfor %} 

how can display name of category (now empty values)?

when i'm using child.get('name'), error

method "get" object "symfony\component\form\formview" not exist in ...

i guess

child.name 

(and not post answer without entering @ least 30 characters)


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

php - Find a regex to take part of Email -

javascript - Function overwritting -