开发者

Unique IDs for Symfony select_tag() helper

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜