Cascading DropDown "No Records found" in AutoComplete only

rrwilson

Member
Hello all,

I am wandering back to Fabrik after some time out and have a working cascading dropdown. It works perfectly when rendered as anything except Autocomplete (Dropdowns, ticks, radios, etc. all work perfectly in the frontend and when looking under the bonnet).

I have done a Github refresh of everything, which didn't help, and I even reinstalled the zip package for the plugin....

Not sure what to do. It says the plugin is on 3.4.3 March 2016.

I did see an old bugfix that mentioned cascading autocomplete failing when there is only one item being looked up, but that was years ago.

Any advice or missed documents I can be pointed at would be appreciated!

R
 
Hmmm.

In the element settings, under List Settings, Filter tab, try setting the "Filter data" to "Show All".

-- hugh
 
Nope. It seems to be a weakness in our code. But I can't see a simple fix. The issue being that the same generic element model method is called for autocomplete handling for both list filters, and elements in forms. I'm continuing to look at it.

-- hugh
 
Muchos gracias Hugh :cool:

Are there other implications that come from this issue, or does "Show All" sort it straight out? Is there anything you'd like me to tell you the look of while I am on this that might help you?
 
Well the only "side effect" would be that if you need to filter on that element, it would offer selections from "all data" (everything in the joined table), rather than only offering selections that are actually used in the form's table ("recorded data").

No need for anything else for you, I know what the issue is. It'd just be a pain in the butt to work around, and it's such a corner case (very few people use CDD's in autofill mode) I can't really justify the work to "fix" it. There's a workaround, with a limited impact.

-- hugh
 
Thanks again Hugh. Make complete sense and not the end of the world for me :)

FYI for anyone using calculated fields with a cascading dropdown in a repeating group. My calc field's Eval PHP code included references to _raw data, but I forgot to do this in one place in that code. That led to a weird side effect:

when opening an existing record in the form that has that repeating group, the repeating records are there. The problem comes when newly adding a new record to the repeating group. The autocomplete cascade in first record in that group literally clears/disappears after changing the watched field on the new record being added (i.e. not not the first record's watched field). This happens in both table and list view for that repeating group. It goes away when changing from Autocomplete to Dropdown. o_O

But the problem was with my eval code in the calc field forgetting to reference raw data at one point! :oops::rolleyes:
 
Scratch that - was going cross eyed after switching render type so many times. The dropdowns were still in play.

So the problem I thought I'd fixed had not been and still exists..... i.e. that first record's cascading autocomplete is killed when changing the watched field on a new record you try to add. And the autocomplete seems to stop working for that added record too.
 
OK, I'm about halfway to fixing that one. I'm trying to get a Fabrik build done at the moment, so it might be a day or two before I can get it fully resolved.

-- hugh
 
I went ahead and gave it a try doing a full master refresh from github via
Code:
wget --no-check-certificate https://github.com/Fabrik/fabrik/tarball/master -O - | tar -zx --strip-components 1
but still have the same issue with the first autocomplete dying and the new one not working at the same point.

Not sure if this should have fixed it, or if the commit was elsewhere. I only understand vaguely how git works and am not sure if this is the update you expected or if your commit was separate to that master version....

Did I do what you expected?
 
Sorry - crazy busy since Friday. Thanks Hugh, that would be great :)

The site is up in the air. I'll need to come back to you when I have something to put in the sites form.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top