Current status: Solved. . Done
Conditional logic script output causes events to fire multiple times
  • It appears that when there are multiple conditions to a field's display, the triggers are output multiple times. This causes some performance issues, especially when used with AJAX.

    For example (from actual project code output):

    // add change events to all fields
    $('.field-field_56 *[name]').live('change', function(){
    $(document).trigger('acf/conditional_logic/field_59');
    });
    $('.field-field_56 *[name]').live('change', function(){
    $(document).trigger('acf/conditional_logic/field_59');
    });

    I'm not sure if it's localized to a specific field type. I have observed it with the Select fields.
  • Hi @deltafactory,

    Thanks for the bug report. I'll do some testing and fix this ASAP

    Cheers
    Elliot
  • Hi @deltafactory,

    This has been fixed and pushed to the latest nightly build on github

    Cheers
    Elliot