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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

Weird behavior with ManyManyComplexTableField and checkboxes


Go to End


1207 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.