开发者

Unique IDs for Symfony select_tag() helper

开发者 https://www.devze.com 2022-12-23 03:34 出处:网络
With the select_tag() helper, is there a way to avoid passing an id to the generatedelement? If not, what do you do when you have th开发者_StackOverflow社区e same form several times on a page and you

With the select_tag() helper, is there a way to avoid passing an id to the generated element?

If not, what do you do when you have th开发者_StackOverflow社区e same form several times on a page and you want to keep ids unique?


Ah, so here's the solution:

select_tag($name, $option_tags, array('id'=>'label_picker_for_' . $article_id);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号