Reputation: 1946
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
Upvotes: 0
Views: 682
Reputation: 1946
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
Upvotes: 0
Reputation: 14135
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.
Upvotes: 1