Title: Inline CSS code issue 5.7
Last modified: December 13, 2022

---

# Inline CSS code issue 5.7

 *  [engrmhk](https://wordpress.org/support/users/engrmhk/)
 * (@engrmhk)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/inline-css-code-issue-5-7/)
 * Hi Team,
 * I have been using CF7 for almost a decade, but I saw a weird issue after the 
   current upgrade, all the CSS design got scattered and even the bootstrap classes
   are not working anymore with the form. The row properties are invalid and the
   row items are showing vertically.
 * Can you please fix this? I already updated this on my 3 websites and don’t want
   to revert it back.
 * Thank you.
 * [Mudassir Hassan Khan](https://www.mudassir.co/)

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

 *  [Vanoisbe](https://wordpress.org/support/users/lepapefrancois/)
 * (@lepapefrancois)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/inline-css-code-issue-5-7/#post-16283987)
 * This occurs because CF7 now adds <p> tag on every line return.
 * You can disable this behaviour :
    - open your `wp-config.php` file in the WordPress root installation directory.
    - add a line with `define('WPCF7_AUTOP', false );` in the beginning of the file.
 * WPCF7_AUTOP is an official constant of CF7, you can learn more here : [https://contactform7.com/controlling-behavior-by-setting-constants/](https://contactform7.com/controlling-behavior-by-setting-constants/)
 *  [kimcoetzee](https://wordpress.org/support/users/kimcoetzee/)
 * (@kimcoetzee)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/inline-css-code-issue-5-7/#post-16284222)
 * Hi Vanoisbe I had the same problem as Mudassir but adding that line of code to
   the wp-config.php file did nothing.
 * The only place it works is if you change the code in wp-contact-form-7.php from
   true to false. (Which is a temporary solution at best)
 *  Thread Starter [engrmhk](https://wordpress.org/support/users/engrmhk/)
 * (@engrmhk)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/inline-css-code-issue-5-7/#post-16284447)
 * Hi [@lepapefrancois](https://wordpress.org/support/users/lepapefrancois/),
 * This option worked for me. Thank you for saving my day.
 *  Thread Starter [engrmhk](https://wordpress.org/support/users/engrmhk/)
 * (@engrmhk)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/inline-css-code-issue-5-7/#post-16284450)
 * Dear [@kimcoetzee](https://wordpress.org/support/users/kimcoetzee/),
 * Will give a try of your option on my other site and test will test if it works.
 * Thank you.
 *  [sujukiaren](https://wordpress.org/support/users/sujukiaren/)
 * (@sujukiaren)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/inline-css-code-issue-5-7/#post-16284494)
 * Hello [@engrmhk](https://wordpress.org/support/users/engrmhk/),
 * Did you checked the same problem with email? if you have stylist email which 
   is send when form is submit then you will find huge spaces under the email also.
   the <p><br></p> tags also include under the mail code.
 * As “define(‘WPCF7_AUTOP’, false );” successfully resolved the problem of form
   frontend but how we can remove <p> tags from mail?
 * please help if anyone resolved this issue.
 * This problem comes in 5.7 version, the older version 5.6.4 was just perfect.
 *  [Arafat Jamil](https://wordpress.org/support/users/arafatjamil01/)
 * (@arafatjamil01)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/inline-css-code-issue-5-7/#post-16284554)
 * Well, I think adding a <p> tag for every new line is not a good idea, because
   a lot of my themes have cf7 integrated, and the design breaks as soon as I change
   even a line of code.
 * Asking every user to add define(‘WPCF7_AUTOP’, false ); in wp-config is pretty
   hard for people with no code experience.
 * Please get back to the previous version.
    -  This reply was modified 3 years, 5 months ago by [Arafat Jamil](https://wordpress.org/support/users/arafatjamil01/).
 *  [shozo](https://wordpress.org/support/users/shozoon/)
 * (@shozoon)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/inline-css-code-issue-5-7/#post-16284640)
 * Hi,
    Try putting the below code on functions.php.
 * add_filter(‘wpcf7_autop_or_not’, ‘wpcf7_autop_return_false’);
    function wpcf7_autop_return_false(){
   return false; }
 *  [Vanoisbe](https://wordpress.org/support/users/lepapefrancois/)
 * (@lepapefrancois)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/inline-css-code-issue-5-7/#post-16284726)
 * [@arafatjamil01](https://wordpress.org/support/users/arafatjamil01/)
 * > Asking every user to add define(‘WPCF7_AUTOP’, false ); in wp-config is pretty
   > hard for people with no code experience.
 * Totally agree!
    I spent half a day, changing 50+ website wp-config.php yesterday…
   At least, it will be set for the next update. I don’t know why there is not already
   a new upgrade of the plugin…
 *  [Webviz](https://wordpress.org/support/users/babuagiorgi/)
 * (@babuagiorgi)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/inline-css-code-issue-5-7/#post-16284778)
 * This fixes the contact form but breaks the page.
    “open your wp-config.php file
   in the WordPress root installation directory. add a line with define(‘WPCF7_AUTOP’,
   false ); in the beginning of the file.”
 *  Thread Starter [engrmhk](https://wordpress.org/support/users/engrmhk/)
 * (@engrmhk)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/inline-css-code-issue-5-7/#post-16285331)
 * Hi [@arafatjamil01](https://wordpress.org/support/users/arafatjamil01/), Agree
   with you. Asking everyone to do so is not an easy job and the as most people 
   are not pro, so they face a lot of issues while fixing it.
 *  [brownm52](https://wordpress.org/support/users/brownm52/)
 * (@brownm52)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/inline-css-code-issue-5-7/#post-16285728)
 * Having the same issues, why has this default behaviour changed?
 * Can this be regressed please to avoid the need to roll-back/update many sites.
 * Thx
 *  [Daniel Chase](https://wordpress.org/support/users/riseofweb/)
 * (@riseofweb)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/inline-css-code-issue-5-7/#post-16287018)
 * [@shozoon](https://wordpress.org/support/users/shozoon/) – Thanks, this worked
   for me. Here is an even lighter weight code to add to functions.php.
 * `add_filter('wpcf7_autop_or_not', '__return_false');`
 *  [shozo](https://wordpress.org/support/users/shozoon/)
 * (@shozoon)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/inline-css-code-issue-5-7/#post-16287088)
 * [@riseofweb](https://wordpress.org/support/users/riseofweb/) – Ah, okay. Thank
   you!
    -  This reply was modified 3 years, 5 months ago by [shozo](https://wordpress.org/support/users/shozoon/).
 *  [gadgeteer68](https://wordpress.org/support/users/gadgeteer68/)
 * (@gadgeteer68)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/inline-css-code-issue-5-7/#post-16294890)
 * While poking into code files can be understandably unnerving to the uninitiated,
   I agree the larger issue is the maintenance aspect. Not only will it take a lot
   of time to make the change on many sites but wouldn’t it get overwritten by a
   WordPress update? The better solution would be to create a toggle control for
   autop as an option in the settings of the plugin, would it?

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

The topic ‘Inline CSS code issue 5.7’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 14 replies
 * 10 participants
 * Last reply from: [gadgeteer68](https://wordpress.org/support/users/gadgeteer68/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/inline-css-code-issue-5-7/#post-16294890)
 * Status: not resolved