advancedforms / advanced-forms

WordPress plugin to create forms using Advanced Custom Fields
75 stars 14 forks source link

ACF not defined in wp-admin #97

Closed DimitrijRees closed 2 years ago

DimitrijRees commented 2 years ago

Just noticed a JS console error in wp-admin on all websites where we're using ACF and AF:

Uncaught ReferenceError: acf is not defined

Thrown in:

acf.addAction('new_field/name=af_block_form', function (e) { var t = e.$el.closest('.acf-block-component'); a(e.val(), t), e.$input().change(function () { a(e.val(), t) }) }),

The issue only persists when there are no ACF fields present (dashboard, page overview etc.). I guess the action should be restricted accordingly?

fabianlindfors commented 2 years ago

Should be fixed by #99 which will make its way into the next release!