{"id":700,"date":"2012-01-11T19:59:03","date_gmt":"2012-01-12T05:59:03","guid":{"rendered":"http:\/\/mymonkeydo.com\/?p=700"},"modified":"2020-05-03T16:30:15","modified_gmt":"2020-05-04T02:30:15","slug":"extra-line-breaks-in-contact-form-7","status":"publish","type":"post","link":"https:\/\/mymonkeydo.com\/extra-line-breaks-in-contact-form-7\/","title":{"rendered":"Extra Line Breaks in Contact Form 7"},"content":{"rendered":"
I added the Contact Form 7 wordpress plugin and created my form. \u00a0I created it with no line breaks whatsoever. \u00a0It looked like this:<\/p>\n
<span>Name<\/span><span>[text* contact-name]<\/span><span>Email<\/span><span>[email* contact-email]<\/span><span>Message<\/span><span>[textarea* contact-message x4]<\/span>[submit “Submit”]<\/p>\n
However, on the page, I had <br> tags after Name and each of the labels. \u00a0WHY?<\/p>\n
<\/p>\n
Apparently\u00a0WPCF7_AUTOP function in the plugin automatically adds the br tag. \u00a0The best solution is to add a style to hide the br in the form:<\/p>\n
<\/p>\n
.wpcf7-form-control-wrap br { display: none; }<\/pre>\nThe rest of the solutions are found here:<\/p>\n
http:\/\/www.alvaronicardo.com\/remove-line-break-from-contact-form-7\/<\/p>\n
keywords: \u00a0contact form 7 extra break line<\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[2],"tags":[17,64],"yoast_head":"\n
Extra Line Breaks in Contact Form 7 - My Monkey Do<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n