WordPress.org

Support

Support » How-To and Troubleshooting » [Plugin: Contact Form 7] How Do I Get Rid of the <br /> Tag After the Opening Div?

[Plugin: Contact Form 7] How Do I Get Rid of the <br /> Tag After the Opening Div?

  • Hi there,

    I really like this plugin, but there is just one stylistic problem that I need help taking care of. I notice that the form tags are automatically surrounded by a div tag. However, this div tag is followed by a
    and then comes the <form> tag. I don’t want this
    tag and I can’t figure out how to get rid of it. Any suggestions?

    Here, btw, is the code in question:

    <div id="wpcf7-f2-p29-o1" class="wpcf7"><br />
    <form enctype="multipart/form-data" class="wpcf7-form" method="post" action="/wordpress/site/?page_id=29#wpcf7-f2-p29-o1">

    Any help would be greatly appreciated.

    Thanks and be well,

    Moshe

Viewing 1 replies (of 1 total)
  • The inserted br tag is not intended. Looks strange. Maybe wpautop() is working. Try this:

    1. Open wp-contact-form-7.php and find the line defining WPCF7_AUTOP constant. In the latest version it’s on line 54.

    2. Change to define('WPCF7_AUTOP', <strong>false</strong>);

    If this doesn’t fix the problem, you should doubt other plugins or theme conflicting.

    Are there any other users facing the same issue? I don’t see br on my environment.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Contact Form 7] How Do I Get Rid of the <br /> Tag After the Opening Div?’ is closed to new replies.
Skip to toolbar