Title: cf7ms loading script &amp; style when cf7 scripts disabled
Last modified: March 28, 2019

---

# cf7ms loading script & style when cf7 scripts disabled

 *  Resolved [darthyoda6](https://wordpress.org/support/users/darthyoda6/)
 * (@darthyoda6)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/cf7ms-loading-script-style-when-cf7-scripts-disabled/)
 * I’m following the directions from [](https://contactform7.com/loading-javascript-and-stylesheet-only-when-it-is-necessary/)
   on how to only load the contact form 7 style & script only on the pages you need
   it on. CF7 checks to see if either the filter or definition has been set, and
   if not then it will enque the 2 files. CF7 MS checks to see if the correct version
   of cf7 is installed & activated, but doesn’t check to see if the script is actually
   enqueued before queing the cf7ms script and style. So the multi-form files are
   always loading whether contact form 7 codes are running or not.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [webheadcoder](https://wordpress.org/support/users/webheadllc/)
 * (@webheadllc)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/cf7ms-loading-script-style-when-cf7-scripts-disabled/#post-11367688)
 * Thanks for letting me know. If you need a fix now, you can try the following:
 * Edit the cf7msm.php file:
 * On line 126, change:
    `array( 'jquery' ),` to: `array('jquery', 'contact-form-
   7'),`
 * Also line 133, change:
    `array(),` to: `array('contact-form-7'),`
 * Note that this hasn’t been tested yet. I’ll be testing later this week and hopefully
   put up an update of the plugin sometime next week.
 *  Thread Starter [darthyoda6](https://wordpress.org/support/users/darthyoda6/)
 * (@darthyoda6)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/cf7ms-loading-script-style-when-cf7-scripts-disabled/#post-11367788)
 * Thanks. Quick testing shows that the code changes work.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘cf7ms loading script & style when cf7 scripts disabled’ is closed to 
new replies.

 * ![](https://ps.w.org/contact-form-7-multi-step-module/assets/icon-256x256.png?
   rev=1793363)
 * [Contact Form 7 Multi-Step Forms](https://wordpress.org/plugins/contact-form-7-multi-step-module/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7-multi-step-module/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7-multi-step-module/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7-multi-step-module/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7-multi-step-module/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7-multi-step-module/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [darthyoda6](https://wordpress.org/support/users/darthyoda6/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/cf7ms-loading-script-style-when-cf7-scripts-disabled/#post-11367788)
 * Status: resolved