cmb2-conditionals icon indicating copy to clipboard operation
cmb2-conditionals copied to clipboard

Conditionals not working when group elements are reordered.

Open jrfnl opened this issue 9 years ago • 1 comments

From @siamzam in #2:

Thanks for the solution to the issue 2 "Fields conditional on other fields within groups". It works great. However, there is one small problem. Whenever the group elements are sorted using the up and down buttons the conditional functionality does not work e.g. all the hidden elements are shown again.

Can you plz have a look at that?

jrfnl avatar Jun 07 '16 11:06 jrfnl

I added this custom javascript code to cmb2-conditionals.js on line 38 and fixed it;

changeContext.on( 'click', 'a.cmb-shift-rows', function() { $.each( $('#dynamic_boxes_repeat_group_repeat .cmb-repeatable-grouping'), function( key, value ) { $(value).find("select").trigger("change"); }); });

koffielyder avatar Jul 22 '19 09:07 koffielyder