admin管理员组

文章数量:1125560

The Contact Form 7 plugin includes a spinner that appears when the form is being submitted. How can I stop this spinner from showing up? I don't want to use the methods of hiding it with "hidden" or "display:none" because this still causes the spinner to load and can cause a layout shift. What is another solution to prevent the spinner from running?

The Contact Form 7 plugin includes a spinner that appears when the form is being submitted. How can I stop this spinner from showing up? I don't want to use the methods of hiding it with "hidden" or "display:none" because this still causes the spinner to load and can cause a layout shift. What is another solution to prevent the spinner from running?

Share Improve this question asked May 10, 2023 at 11:16 Aprilia ParrinoAprilia Parrino 431 gold badge2 silver badges9 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 1

If you're still seeing the spinner after adding this CSS

   .wpcf7-spinner {
      display: none !important;
      visibility: hidden !important;
    }

then you're CSS selector isn't specific enough and you can try adding more selectors to increase specificity.

It's not necessary to completely disable CF7 Javascript to simply hide the spinner.

just put this snippet ...

add_filter( 'wpcf7_load_js', '__return_false' );

... in your child-themes functions.php and just like that, the matter is solved.

本文标签: Contact Form 7how to disable spinner the right way