开发者

symfony - custom multiple checkbox widget - help

I'm trying to create a custom multiple choice checkbox widget, that displays all items of a model.

My model is named 'Tag', which is a list of tags in my DB table.

开发者_如何学编程

I have copied the sfWidgetFormSelectCheckbox code and pasted it into my new widget class, but I'm unsure what to do next

Could someone help me?

Thanks


If your issue is working with tags. Best to look at sfDoctrineActAsTaggable. It should have all the behaviour you require, hence you should be able to dissect it to achieve what you are after.


I managed to get this working using some custom code, i.e. getters and setters and overriding the doUpdateObject() and updateDefaultsFromObject methods in my form class

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜