How to dequeue scripts

Created by Phil Kurth, Modified on Thu, 30 Jun 2022 at 11:33 AM by Phil Kurth

The enqueues are a combination of what Advanced Forms and what Advanced Custom fields need to render a form correctly. One script is enqueued by Advanced Forms: 'af-forms-script' and one by ACF: 'acf-input'. These in turn depend on jQuery. 


To dequeue them I would recommend using the af/form/enqueue action documented here:

https://advancedforms.github.io/guides/decreasing-number-of-scripts-and-styles/


It's worth noting though that jQuery is necessary for most forms. ACF for example needs jQuery to run the form validation and to set up many of its fields. Dequeueing it or any of the other required assets may result in unusual behaviour.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article