Cascading Drop Down are not working in repeated groups

juanmarmol

New Member
Hello,

I have seen several threads regarding this issue, but could't find any one with an actual solution to this problem. When I add a CDD in a repeated group, I have to manually change the observed value, even though it has a default one, to load the contents of a CDD. I get the following messages in the console every time a group is created:

[Log] jp_jaz_productos_pedido___producto_0 attach to form:TypeError: null is not an object (evaluating 'this.options.observe.each') (fabrik-min.js, line 2)
[Log] jp_jaz_productos_pedido___unidad_de_medida_0 attach to form:TypeError: null is not an object (evaluating 'this.options.observe.each') (fabrik-min.js, line 2)

I attached an image that describes the problem. The second group has two CDDs (Producto and Unidad de Medida) watching the Drop Down Categor?a. The ajax update is triggered, but brings nothing back. If I change the value of Categor?a, the ajax update works correctly.

Could you please help me solving this issue. Thanks in advance for your help and prompt reply.

PS.

You have created a really great product. Amazing work.
 

Attachments

  • cdd_error.jpg
    cdd_error.jpg
    412.2 KB · Views: 201
Hmmm. I can replicate the issue with the CDD not populating when a new group is added - and I'm testing a fix. But I don't get the 'null is not an object' errors.

If you disable one of the CDD's, so you just have the watched element and one CDD, does it still happen?

Is Categoria a dropdown, or a join being rendered as a dropdown?

-- hugh
 
Hi Hugh,

Yeah, I disabled one of the CDD's, and it still happens (only one null object message in this case, of course). I added an empty value option in the Categor?a dropdown to simulate the "Please select" choice. In this way I force the user to change the dropdown value, and fire the Ajax update of the CDD's. It works most of the times, but not always.

Thank you very much for your help.
 
My temporary solution is to bump the watched databasejoin dropdown back to a Please Select value of 0 in my form_8.js file:

Code:
requirejs(['fab/fabrik'], function() {
  

  Fabrik.addEvent('fabrik.form.group.duplicate.end', function (form, event) {
     var groupId = 15;
     var repeatMax = form.repeatGroupMarkers[groupId];
       el = form.formElements['wic_itinerary___area_id_' + repeatMax ] ;
       el.update(0);
  });
});

But it would be nice if I could get the CDD to repopulate with the same data.
 
It is fixed. I've been reluctant to update via github on my live sites since the 3.4.3 release. At that time the latest github version it caused multiple other issues.

I just set up a dev site and everything's working out well so far. This issue is resolved.

Thanks!
 
I think most of the issues in github from around the time of the 3.4.3 release have been resolved. There may be a few lingering issues to do with popup windows, if you find any, let us know.

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

Thank you.

Members online

Back
Top