Support

Account

Home Forums Backend Issues (wp-admin) Custom location rule JS refresh Reply To: Custom location rule JS refresh

  • I can’t say if this will get you in the right direction or not. I have created a plugin that lets you set location rules by select fields in other field groups. When it came to the JS part of it what I did was to extend the ACF AJAX to add my own and to trigger the updated. You can see this here https://github.com/Hube2/acf-custom-field-locations-rule/blob/master/acf-custom-field-location-rule.js.

    Like I said, this extends acf.ajax. What it does is that it gets the value for a field and then triggers ACF to refresh (fetch) the field groups. There shouldn’t be any reason that you couldn’t do this with fields outside of ACF as will.