Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Weird behavior with ManyManyComplexTableField and checkboxes


Reply


936 Views

Avatar
SilverRay

Community Member, 167 Posts

17 August 2008 at 8:51pm

Edited: 17/08/2008 8:53pm

I have some really strange behavior with using checkboxes for a manymany relation. I have a dataobject with a bunch of text fields. I have it set up in a manymany array. The list of entries appears in the CMS-side of things, like it should. In the database, there's proper tables for the dataobject, and the classes it is a manymany part of so to speak. Normally, when I check a checkbox in the list that is generated by a ManyManyComplexTableField in the CMS, the choice sticks, it saves an entry in the manymany table in the database, and the control block in my .ss template renders the page fine. But sometimes, when I click or unclick (multiple) checkboxes, the choices made don't stick, and in some cases checking a checkbox *deletes* an entry from the manymany join, in other words, reverse behavior! This is with Silverstripe 2.2.2.

Has anybody seen this behavior? If you need code, I'm happy to show you!

Thanks in advance,
- SilverRay.

edit: spelling.