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
精彩评论