cascading dropdown in a repeating group - element doesn't populate when watch is set to default

skyrun

Active Member
Doesn't work at all for me, that date_enh.js (which I think is your custom date element) is erroring out during page load, so the CDD JS is never initializing.

I don't know if that's causing the problem you are seeing - probably not, as you said it's working if you select another country, which wouldn't work if you were seeing the same problem I am. But I can't debug it with the date error.

Line 62, "cannot read property value of null", where it does this.getDateField().value at the start of setUp(), which is returning null because the date_time element seems to be readonly, so has no date field.

-- hugh
 
i'm not getting any console js errors. please try an ignognito/private window or a cache clear. i think you have some old code.
 
sorry if i confused. the .js you were seeing when fabrikdebug=1 is fixed so you can now work on the issue.

the issue is still there.
 
Oh, I knew what you meant. And I'm working on the issue locally now. I could have sworn we had code to re-fire the CDD on group duplication, but I apparently not.

I'll update this thread when it's fixed.

-- hugh
 
OK, should be fixed as of this commit:

https://github.com/Fabrik/fabrik/co...6f2bf52#diff-65e8ed9f5e7ff3f97e74353d40ecc705

My memory was correct, we do have a specific mechanism for re-building the CDD options when attached to a new duplicated group. But for reasons unknown, I commented it out a few years ago:

https://github.com/Fabrik/fabrik/co...2d95dfa#diff-65e8ed9f5e7ff3f97e74353d40ecc705

... in a totally unrelated commit. I vaguely remember testing some other issue with CDD's in repeats, can't remember what it was, but it was very corner case. Commenting out that line fixed that problem, but wasn't really a fix, and I think I intended to find a real fix but obviously got distracted and forgot, and that temporary testing change got committed with something else. So I've probably re-introduced some other subtle issue with CDD's in repeats, but for now, we should be good.

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

Thank you.

Members online

Back
Top