php - symfony change attribut 'for' form_label -
i search in google don't find how change( surcharging) 'for' attribut in form_label.
{{ form_widget(form.star,{'id':'rating-input-1-5','attr':{'class':'rating-input'}}) }} {{ form_label(form.star,null,{'label_attr':{'class':'rating-star','for':'rating-input-1-5'}}) }} {{ form_widget(form.star,{'id':'rating-input-1-4','attr':{'class':'rating-input'}}) }} {{ form_label(form.star,null,{'label_attr':{'class':'rating-star','for':'rating-input-1-4'}}) }} {{ form_widget(form.star,{'id':'rating-input-1-3','attr':{'class':'rating-input'}}) }} {{ form_label(form.star,null,{'label_attr':{'class':'rating-star','for':'rating-input-1-3'}}) }} {{ form_widget(form.star,{'id':'rating-input-1-2','attr':{'class':'rating-input'}}) }} {{ form_label(form.star,null,{'label_attr':{'class':'rating-star','for':'rating-input-1-2'}}) }} {{ form_widget(form.star,{'id':'rating-input-1-1','attr':{'class':'rating-input'}}) }} {{ form_label(form.star,null,{'label_attr':{'class':'rating-star','for':'rating-input-1-1'}}) }}
i want form_label point on id of form_widget.
is possible ?
thanks answer
try change form_label
call to
{{ form_label(form.star,null,{'id':'rating-input-1-5', 'label_attr':{'class':'rating-star'}}) }}
Comments
Post a Comment