I create a form in my sf2 project, so for input I do in twig:
{{ form_widget(form.price) }}
output:
<input type="checkbox" value="1" required="required" name="mybundle_appbundle_producttype[price]" id="mybundle_appbundle_producttype_price">
My question is: how to get the name or content "id" of only mybundle_appbundle_producttype_price in a branch?
Because for each field I will use the CSS identifier in the Javascript code.
html symfony twig
Nabilovish bennani
source share