Checkbox List Cascading Dropdown Issue in Repeating Group

davez

Member
I've been trying out the multi-select Cascading drop-down (still working on my calendar solution when I have time). I have it inside a repeating group and I get an error when it tries to save the data. I noticed that it creates its own table to store the multiple-selected options in the cascading dropdown, but when it stores the data it pumps out this mysql error: Unknown column 'parent_id' in 'where clause'

As usual it works fine when "rendered as" a normal single-select dropdown. It just doesn't seem to work when it's rendered as Checkbox list or Multi-select dropdown.

The list display is bugging out as well, when that element is published in that state.

Could this be because it's in a repeating group?

I'm updated with the latest.
 
Last time I checked, multiselect CDD's weree working in repeat groups ... but it's some very hairy code, as the repeat group is already a one-to-many table related to the main table, and the multiselect (as you say) as to use a many-to-many mapping table ... so that's the main table, one-to-many to group, then many-to-many with CDD. Building the queries for that is ... interesting.

I'll take another look at my CDD torture test form, which has repeat multiselects.

-- hugh
 
I've got it to work outside of a repeat, but I'm still not getting the CDD checkbox to work inside a repeat. It does displays properly in the list (when I hand-feed the repeat table with the appropriate data: parent_id, date_visit). It also will load that data into the form on edit. But when I save it, it churns out: Unknown column 'date_visit' in 'field list'.

date_visit is the column name I'm using for the CDD field in the repeat.
 
To clarify, it's the save/storing of the data after the form submission that's not working for me. In fact, it won't run my form's php plugin onAfterProcess script. It will run the php if it's onBeforeProcess. And it does store all the other form data, just not that one CDD field.
 
Okay, I got it to work. Here's what I'm finding: 2 issues.

1) If I create a CDD element, but first have it set as just a standard dropdown, then I change it to checkbox or a multi-select, it does not set the correct parameters to link up everything properly, so I get the error above. That is what kept happening. Every time I trashed and recreated the element, I would forget to set it as a checkbox, so it wouldn't link up properly. Finally, I set it up as a checkbox the first time around and it worked.

2) In all cases, each time I set up a CDD element in a joined table, the parent element parameters do not copy over to the child element parameters. So, I was required to go into the database and copy over the parameters from the parent element to the child element.

It seems like these two issues may be related. Anyway, I can get it to work now! Not that I really want to...it all seems a bit shaky.
 
Hmmm, interesting. That gives me something to go on.

Of course, in my torture test form, I created it as a checkbox to start with, in a group I created on that form as a repeat group, so although it's a "joined table", the elements aren't children. And that use case is solid. I did some more testing on that, it's working fine, has been for the last couple of years. That CDD torture test forms is one of the standard ones I run any new release through, and after any work anywhere near the join code.

And just to make sure, I just created a new test form ... create a List, add a group as a repeat, add elements to the new groups (with a join and a CDD as a checkbox in the repeat) and it works fine.

So the actual underlying join handling code is solid. What obviously isn't so solid is if you add a join to a list from an existing table, such that the CDD is a child of an existing CDD. I'll see if I can resolve that.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top