get name of css ID in a form in twig
I'm building a form in my sf2 project,so to provide a input I do in twig :
{{ form_widget(form.price)  }}
so the output is :
<input type="checkbox" value="1" required="required"
       name="mybundle_appbundle_producttype[price]"
         id="mybundle_appbundle_producttype_price">
So my question is: How to get the name or content of "id" only
mybundle_appbundle_producttype_price in twig?
Because for every field I'll use the id CSS in javascipt code.
 
No comments:
Post a Comment