Answer the question
In order to leave comments, you need to log in
How to wrap radio input in separate div?
There are a lot of radio inputs in the form, you need to put each one in a div, how can this be done?
//form
->add('sex', ChoiceType::class, array(
"label" => 'Роль:',
'choices' => array(
'Мужской' => 1,
'Женский' => 2
),
'expanded' => true,
'multiple' => false,
'attr' => array(
'has_branching' => 1,
"branching_logic" => 0,
"section_header" => 'test'
)
))
{{ form_widget(form.budget) }}
<div id="create_task_sex" has_branching="1" branching_logic="0" section_header="test"><input type="radio" id="create_task_sex_0" name="create_task[sex]" required="required" value="1" /><label for="create_task_sex_0" class="required">Мужской</label><input type="radio" id="create_task_sex_1" name="create_task[sex]" required="required" value="2" /><label for="create_task_sex_1" class="required">Женский</label></div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question