In input.js, line 636, there is a query finding an ACF field’s value to match against another field’s conditional logic rules:
// get val and make sure it is an array
var val = $field.find('input, textarea, select').last().val();
As I use a third-party jQuery plugin (Chosen) that inserts an internal search input field (without a name
attribute), the ACF conditional logic fails, as the last input field is that search field.
I solved it by filtering the selection with .filter('[name^="field"]')
before doing the last()
filter, which might be a good solution to this problem.
Hi @alexanderwallin
Thanks, I like the JS and I’ll add it in.
Cheers
E