{"id":1697,"date":"2019-09-03T18:20:20","date_gmt":"2019-09-03T18:20:20","guid":{"rendered":"https:\/\/mooi.hu\/?p=1697"},"modified":"2021-01-23T08:32:05","modified_gmt":"2021-01-23T08:32:05","slug":"contact-form-7-inline-fields","status":"publish","type":"post","link":"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/","title":{"rendered":"Contact Form 7 Inline Fields"},"content":{"rendered":"<header class=\"entry-header\">\n<h1 class=\"entry-title\">Display Contact Form 7 Fields on 2 or More Columns<\/h1>\n<\/header>\n<div class=\"entry-content\">\n<p>I get this question a lot. \u201cHow can I display my contact form on 2 or 3 columns?\u201d or \u201cWhat are my options to have a contact form with fields side by side?\u201d You get it! The main idea is how to get those text fields like Name or Email Address displayed\u00a0<strong>on the same line<\/strong>\u00a0and not one under another. Why? Because it looks good, therefore it increases the user experience. Let`s see what options you have!<\/p>\n<div class=\"table-of-contents\"><\/div>\n<p>I will take the\u00a0<a href=\"https:\/\/wordpress.org\/plugins\/contact-form-7\/\" target=\"_blank\" rel=\"noopener noreferrer\">Contact Form 7 plugin<\/a>\u00a0as an example for this tutorial. I\u2019ve been working with Contact Form 7 since ever, and it\u2019s my first choice when it comes to using a free contact form plugin for a WordPress website.<\/p>\n<div class=\"infobox news\">Learn More:\u00a0<a href=\"https:\/\/deliciousthemes.com\/save-contact-form-7-submissions-to-database\/\">How to Save Contact Form 7 Submissions to Database<\/a><\/div>\n<p>By default, the markup of a contact form created with CF7 looks like this<\/p>\n<p>and the output on the website would be:<\/p>\n<figure id=\"attachment_10285\" class=\"wp-caption aligncenter\" aria-describedby=\"caption-attachment-10285\"><figcaption id=\"caption-attachment-10285\" class=\"wp-caption-text\">Contact Form 7 default form on TwentySeventeen Wp Theme<\/figcaption><\/figure>\n<p>This is the default and you don\u2019t want it. You want custom, tailored to your website\u2019s look and feel. Good news is that\u00a0<strong>the CF7 form builder allows HTML markup<\/strong>\u00a0and we\u2019ll use this to our advantage.<\/p>\n<p>Next, I`m going to show you 2 ways to display those fields on multiple columns.<\/p>\n<p>&nbsp;<\/p>\n<h2 id=\"cf_side_by_side\">Display Contact Form 7 Fields side by side with Column Shortcodes<\/h2>\n<p>By default, CF7 allows only HTML markup inside its editor. To use shortcodes, we need to tell WordPress that we want to enable shortcodes for CF7. There`s a plugin for doing it, called\u00a0<a href=\"https:\/\/wordpress.org\/plugins\/contact-form-7-shortcode-enabler\/\" target=\"_blank\" rel=\"noopener noreferrer\">Contact Form 7 Shortcode Enabler<\/a>. To use the plugin, go to Plugins-&gt;Add New, search for Contact Form 7 Shortcode Installer, install and activate the plugin.<\/p>\n<p>Alternatively, you could do this by adding a filter via the functions.php of your WordPress child theme:<\/p>\n<div>\n<div id=\"highlighter_795196\" class=\"syntaxhighlighter php\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<div class=\"line number5 index4 alt2\">5<\/div>\n<div class=\"line number6 index5 alt1\">6<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"php plain\">add_filter( <\/code><code class=\"php string\">'wpcf7_form_elements'<\/code><code class=\"php plain\">, <\/code><code class=\"php string\">'delicious_wpcf7_form_elements'<\/code> <code class=\"php plain\">);<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"php keyword\">function<\/code> <code class=\"php plain\">delicious_wpcf7_form_elements( <\/code><code class=\"php variable\">$form<\/code> <code class=\"php plain\">) {<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"php variable\">$form<\/code> <code class=\"php plain\">= do_shortcode( <\/code><code class=\"php variable\">$form<\/code> <code class=\"php plain\">);<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"php keyword\">return<\/code> <code class=\"php variable\">$form<\/code><code class=\"php plain\">;<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"php plain\">}<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p><a href=\"https:\/\/wordpress.org\/plugins\/column-shortcodes\/\" target=\"_blank\" rel=\"noopener noreferrer\">Column Shortcodes<\/a>\u00a0is a plugin which adds shortcodes to your WordPress website functionality for displaying content on multiple columns.\u00a0<strong>You can use it<\/strong>\u00a0not only for splitting contact form fields on single columns but\u00a0<strong>for any other content on your website<\/strong>. That`s two rabbits hit with one shot!<\/p>\n<div class=\"infobox info\">There are big chances that\u00a0<strong>your theme comes with shortcodes for columns built into it already<\/strong>.\u00a0<a href=\"https:\/\/deliciousthemes.com\/\">My themes<\/a>\u00a0do. So before installing the plugin, make sure you\u2019re checking out or asking the developer of your theme if such shortcodes are available for use with the theme.<\/div>\n<p>To use the plugin, go to Plugins-&gt;Add New, search for Column Shortcodes, install and activate the plugin.<\/p>\n<p>&nbsp;<\/p>\n<p>Once installed, you\u2019ll find a new button on your WordPress editor from which you can generate a column shortcode. Let\u2019s put the plugin to the test. I went to my contact page, generated shortcodes for a two-columns line and placed some content inside the shortcodes:<\/p>\n<p>&nbsp;<\/p>\n<p>Notice that to create a 2-columns line, you need to generate a shortcode for the first half and another shortcode for the last half. The output should be similar to this:<\/p>\n<p>&nbsp;<\/p>\n<p>This is how you\u00a0<strong>split the content<\/strong>\u00a0of a page on two columns. Now that you got those shortcodes, let`s go back to the Contact Form 7 editor(<em>Wp Dashboard&gt;Contact-&gt;Contact Forms: Your contact form<\/em>) and use them with the fields.<\/p>\n<p>The markup of my contact form becomes:<\/p>\n<div>\n<div id=\"highlighter_903112\" class=\"syntaxhighlighter css\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<div class=\"line number5 index4 alt2\">5<\/div>\n<div class=\"line number6 index5 alt1\">6<\/div>\n<div class=\"line number7 index6 alt2\">7<\/div>\n<div class=\"line number8 index7 alt1\">8<\/div>\n<div class=\"line number9 index8 alt2\">9<\/div>\n<div class=\"line number10 index9 alt1\">10<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"css plain\">&lt;div class=<\/code><code class=\"css string\">\"content-column one_half\"<\/code><code class=\"css plain\">&gt;&lt;div style=<\/code><code class=\"css string\">\"padding:\"0;\"<\/code><code class=\"css plain\">&gt;&lt;label&gt; Your Name (required)<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"css spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"css plain\">[text* your-name] &lt;\/label&gt;&lt;\/div&gt;&lt;\/div&gt;<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"css plain\">&lt;div class=<\/code><code class=\"css string\">\"content-column one_half last_column\"<\/code><code class=\"css plain\">&gt;&lt;label&gt; Your Email (required)<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"css spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"css plain\">[email* your-email] &lt;\/label&gt;&lt;\/div&gt;&lt;div class=<\/code><code class=\"css string\">\"clear_column\"<\/code><code class=\"css plain\">&gt;&lt;\/div&gt;<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"css plain\">&lt;label&gt; Your Message<\/code><\/div>\n<div class=\"line number8 index7 alt1\"><code class=\"css spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"css plain\">[textarea your-message] &lt;\/label&gt;<\/code><\/div>\n<div class=\"line number9 index8 alt2\"><\/div>\n<div class=\"line number10 index9 alt1\"><code class=\"css plain\">[submit <\/code><code class=\"css string\">\"Send\"<\/code><code class=\"css plain\">]<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>And the output becomes:<\/p>\n<p>Pretty neat! For having the fields displayed on 3 columns, you will adjust the Contact Form 7 markup to:<\/p>\n<div>\n<div id=\"highlighter_295731\" class=\"syntaxhighlighter xml\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<div class=\"line number5 index4 alt2\">5<\/div>\n<div class=\"line number6 index5 alt1\">6<\/div>\n<div class=\"line number7 index6 alt2\">7<\/div>\n<div class=\"line number8 index7 alt1\">8<\/div>\n<div class=\"line number9 index8 alt2\">9<\/div>\n<div class=\"line number10 index9 alt1\">10<\/div>\n<div class=\"line number11 index10 alt2\">11<\/div>\n<div class=\"line number12 index11 alt1\">12<\/div>\n<div class=\"line number13 index12 alt2\">13<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"xml plain\">&lt;<\/code><code class=\"xml keyword\">div<\/code> <code class=\"xml color1\">class<\/code><code class=\"xml plain\">=<\/code><code class=\"xml string\">\"content-column one_third\"<\/code><code class=\"xml plain\">&gt;&lt;<\/code><code class=\"xml keyword\">div<\/code> <code class=\"xml color1\">style<\/code><code class=\"xml plain\">=<\/code><code class=\"xml string\">\"padding:\"0;\"<\/code><code class=\"xml plain\">&gt;&lt;<\/code><code class=\"xml keyword\">label<\/code><code class=\"xml plain\">&gt; Your Name (required)<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"xml spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"xml plain\">[text* your-name] &lt;\/<\/code><code class=\"xml keyword\">label<\/code><code class=\"xml plain\">&gt;&lt;\/<\/code><code class=\"xml keyword\">div<\/code><code class=\"xml plain\">&gt;&lt;\/<\/code><code class=\"xml keyword\">div<\/code><code class=\"xml plain\">&gt;<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"xml plain\">&lt;<\/code><code class=\"xml keyword\">div<\/code> <code class=\"xml color1\">class<\/code><code class=\"xml plain\">=<\/code><code class=\"xml string\">\"content-column one_third\"<\/code><code class=\"xml plain\">&gt;&lt;<\/code><code class=\"xml keyword\">div<\/code> <code class=\"xml color1\">style<\/code><code class=\"xml plain\">=<\/code><code class=\"xml string\">\"padding:\"0;\"<\/code><code class=\"xml plain\">&gt;&lt;<\/code><code class=\"xml keyword\">label<\/code><code class=\"xml plain\">&gt; Your Email (required)<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"xml spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"xml plain\">[email* your-email] &lt;\/<\/code><code class=\"xml keyword\">label<\/code><code class=\"xml plain\">&gt;&lt;\/<\/code><code class=\"xml keyword\">div<\/code><code class=\"xml plain\">&gt;&lt;\/<\/code><code class=\"xml keyword\">div<\/code><code class=\"xml plain\">&gt;<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"xml plain\">&lt;<\/code><code class=\"xml keyword\">div<\/code> <code class=\"xml color1\">class<\/code><code class=\"xml plain\">=<\/code><code class=\"xml string\">\"content-column one_third last_column\"<\/code><code class=\"xml plain\">&gt;&lt;<\/code><code class=\"xml keyword\">label<\/code><code class=\"xml plain\">&gt; Your Subject<\/code><\/div>\n<div class=\"line number8 index7 alt1\"><code class=\"xml spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"xml plain\">&lt;\/<\/code><code class=\"xml keyword\">label<\/code><code class=\"xml plain\">&gt;&lt;\/<\/code><code class=\"xml keyword\">div<\/code><code class=\"xml plain\">&gt;&lt;<\/code><code class=\"xml keyword\">div<\/code> <code class=\"xml color1\">class<\/code><code class=\"xml plain\">=<\/code><code class=\"xml string\">\"clear_column\"<\/code><code class=\"xml plain\">&gt;&lt;\/<\/code><code class=\"xml keyword\">div<\/code><code class=\"xml plain\">&gt;<\/code><\/div>\n<div class=\"line number9 index8 alt2\"><\/div>\n<div class=\"line number10 index9 alt1\"><code class=\"xml plain\">&lt;<\/code><code class=\"xml keyword\">label<\/code><code class=\"xml plain\">&gt; Your Message<\/code><\/div>\n<div class=\"line number11 index10 alt2\"><code class=\"xml spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"xml plain\">[textarea your-message] &lt;\/<\/code><code class=\"xml keyword\">label<\/code><code class=\"xml plain\">&gt;<\/code><\/div>\n<div class=\"line number12 index11 alt1\"><\/div>\n<div class=\"line number13 index12 alt2\"><code class=\"xml plain\">[submit \"Send\"]<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>\u2026and the output will become:<\/p>\n<p>So the takeaway for this method is:<\/p>\n<ol>\n<li>Install Column Shortcodes plugin to enable shortcodes for splitting content on multiple columns<\/li>\n<li>Install Contact Form 7 Shortcode Enabler plugin to allow the use of shortcodes in the CF7 editor<\/li>\n<li>Wrap Contact Form 7 fields with shortcodes like so\u00a0<code><\/code>\n<div class=\"content-column one_half\">\n<div>&#8230;cf7 field &#8230;<\/div>\n<\/div>\n<p>and<code><\/code><\/p>\n<div class=\"content-column one_half last_column\">&#8230;cf7 field &#8230;<\/div>\n<p><code><\/code><\/p>\n<div class=\"clear_column\"><\/div>\n<p>.<\/li>\n<\/ol>\n<div class=\"infobox info\">Did you know you can create your own shortcodes? Check out my\u00a0<a href=\"https:\/\/deliciousthemes.com\/how-to-create-wordpress-shortcodes\/\">tutorial for shortcodes<\/a>.<\/div>\n<h2 id=\"cf_html_markup\">Display Contact Form 7 fields on columns with HTML markup<\/h2>\n<p>Above, I show you how to use plugins to extend WordPress default functionality. The next method is about using default\/basic HTML markup(like divs) and a bit of CSS to split content into columns. Let`s do this.<\/p>\n<p>I`m going to create a series of classes for the columns:\u00a0<code>one-half, one-third, last<\/code>. The CSS code for them is:<\/p>\n<div>\n<div id=\"highlighter_77915\" class=\"syntaxhighlighter css\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<div class=\"line number5 index4 alt2\">5<\/div>\n<div class=\"line number6 index5 alt1\">6<\/div>\n<div class=\"line number7 index6 alt2\">7<\/div>\n<div class=\"line number8 index7 alt1\">8<\/div>\n<div class=\"line number9 index8 alt2\">9<\/div>\n<div class=\"line number10 index9 alt1\">10<\/div>\n<div class=\"line number11 index10 alt2\">11<\/div>\n<div class=\"line number12 index11 alt1\">12<\/div>\n<div class=\"line number13 index12 alt2\">13<\/div>\n<div class=\"line number14 index13 alt1\">14<\/div>\n<div class=\"line number15 index14 alt2\">15<\/div>\n<div class=\"line number16 index15 alt1\">16<\/div>\n<div class=\"line number17 index16 alt2\">17<\/div>\n<div class=\"line number18 index17 alt1\">18<\/div>\n<div class=\"line number19 index18 alt2\">19<\/div>\n<div class=\"line number20 index19 alt1\">20<\/div>\n<div class=\"line number21 index20 alt2\">21<\/div>\n<div class=\"line number22 index21 alt1\">22<\/div>\n<div class=\"line number23 index22 alt2\">23<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"css plain\">.one-half,<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"css plain\">.one-third {<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"css spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"css keyword\">position<\/code><code class=\"css plain\">: <\/code><code class=\"css value\">relative<\/code><code class=\"css plain\">;<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"css spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"css keyword\">margin-right<\/code><code class=\"css plain\">: <\/code><code class=\"css value\">4%<\/code><code class=\"css plain\">;<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"css spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"css keyword\">float<\/code><code class=\"css plain\">: <\/code><code class=\"css value\">left<\/code><code class=\"css plain\">;<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"css spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"css keyword\">margin-bottom<\/code><code class=\"css plain\">: <\/code><code class=\"css value\">20px<\/code><code class=\"css plain\">;<\/code><\/div>\n<div class=\"line number7 index6 alt2\"><\/div>\n<div class=\"line number8 index7 alt1\"><code class=\"css plain\">}<\/code><\/div>\n<div class=\"line number9 index8 alt2\"><\/div>\n<div class=\"line number10 index9 alt1\"><code class=\"css plain\">.one-half { <\/code><code class=\"css keyword\">width<\/code><code class=\"css plain\">: <\/code><code class=\"css value\">48%<\/code><code class=\"css plain\">; }<\/code><\/div>\n<div class=\"line number11 index10 alt2\"><code class=\"css plain\">.one-third { <\/code><code class=\"css keyword\">width<\/code><code class=\"css plain\">: <\/code><code class=\"css value\">30.66%<\/code><code class=\"css plain\">; }<\/code><\/div>\n<div class=\"line number12 index11 alt1\"><\/div>\n<div class=\"line number13 index12 alt2\"><code class=\"css plain\">.last {<\/code><\/div>\n<div class=\"line number14 index13 alt1\"><code class=\"css spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"css keyword\">margin-right<\/code><code class=\"css plain\">: <\/code><code class=\"css value\">0<\/code> <code class=\"css color3\">!important<\/code><code class=\"css plain\">;<\/code><\/div>\n<div class=\"line number15 index14 alt2\"><code class=\"css spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"css keyword\">clear<\/code><code class=\"css plain\">: <\/code><code class=\"css value\">right<\/code><code class=\"css plain\">;<\/code><\/div>\n<div class=\"line number16 index15 alt1\"><code class=\"css plain\">}<\/code><\/div>\n<div class=\"line number17 index16 alt2\"><\/div>\n<div class=\"line number18 index17 alt1\"><code class=\"css plain\">@media only <\/code><code class=\"css value\">screen<\/code> <code class=\"css plain\">and (<\/code><code class=\"css keyword\">max-width<\/code><code class=\"css plain\">: <\/code><code class=\"css value\">767px<\/code><code class=\"css plain\">) {<\/code><\/div>\n<div class=\"line number19 index18 alt2\"><code class=\"css spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"css plain\">.one-half, .one-third {<\/code><\/div>\n<div class=\"line number20 index19 alt1\"><code class=\"css spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"css keyword\">width<\/code><code class=\"css plain\">: <\/code><code class=\"css value\">100%<\/code><code class=\"css plain\">;<\/code><\/div>\n<div class=\"line number21 index20 alt2\"><code class=\"css spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"css keyword\">margin-right<\/code><code class=\"css plain\">: <\/code><code class=\"css value\">0<\/code><code class=\"css plain\">;<\/code><\/div>\n<div class=\"line number22 index21 alt1\"><code class=\"css spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"css plain\">}<\/code><\/div>\n<div class=\"line number23 index22 alt2\"><code class=\"css plain\">}<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>You should insert this code in your child theme(learn more about child themes\u00a0<a href=\"https:\/\/codex.wordpress.org\/Child_Themes\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>) or you could use a plugin for code injection like the\u00a0<a href=\"https:\/\/wordpress.org\/plugins\/simple-custom-css\/\" target=\"_blank\" rel=\"noopener noreferrer\">Simple Custom CSS plugin<\/a>.<\/p>\n<p>The\u00a0<code>.last<\/code>\u00a0class removes the margin-right value from the columns for perfect alignment to the container. Also, a media query specifies that if the screen is smaller than 768px(the width of a tablet screen), display columns one under another. In other words, the code creates responsive columns for Contact Form 7.<\/p>\n<p>Edit the CF7 form and wrap it with divs like\u00a0<code>&lt;div class=\"one-half\"&gt; ... &lt;\/div&gt;<\/code>.<\/p>\n<div>\n<div id=\"highlighter_52440\" class=\"syntaxhighlighter xml\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<div class=\"line number5 index4 alt2\">5<\/div>\n<div class=\"line number6 index5 alt1\">6<\/div>\n<div class=\"line number7 index6 alt2\">7<\/div>\n<div class=\"line number8 index7 alt1\">8<\/div>\n<div class=\"line number9 index8 alt2\">9<\/div>\n<div class=\"line number10 index9 alt1\">10<\/div>\n<div class=\"line number11 index10 alt2\">11<\/div>\n<div class=\"line number12 index11 alt1\">12<\/div>\n<div class=\"line number13 index12 alt2\">13<\/div>\n<div class=\"line number14 index13 alt1\">14<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"xml plain\">&lt;<\/code><code class=\"xml keyword\">div<\/code> <code class=\"xml color1\">class<\/code><code class=\"xml plain\">=<\/code><code class=\"xml string\">\"one-half\"<\/code><code class=\"xml plain\">&gt;<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"xml plain\">&lt;<\/code><code class=\"xml keyword\">label<\/code><code class=\"xml plain\">&gt; Your Name (required) <\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"xml spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"xml plain\">&lt;\/<\/code><code class=\"xml keyword\">label<\/code><code class=\"xml plain\">&gt;<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"xml plain\">&lt;\/<\/code><code class=\"xml keyword\">div<\/code><code class=\"xml plain\">&gt;<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"xml plain\">&lt;<\/code><code class=\"xml keyword\">div<\/code> <code class=\"xml color1\">class<\/code><code class=\"xml plain\">=<\/code><code class=\"xml string\">\"one-half last\"<\/code><code class=\"xml plain\">&gt;<\/code><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"xml plain\">&lt;<\/code><code class=\"xml keyword\">label<\/code><code class=\"xml plain\">&gt; Your Email (required)<\/code><\/div>\n<div class=\"line number8 index7 alt1\"><code class=\"xml spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"xml plain\">[email* your-email] &lt;\/<\/code><code class=\"xml keyword\">label<\/code><code class=\"xml plain\">&gt;<\/code><\/div>\n<div class=\"line number9 index8 alt2\"><code class=\"xml plain\">&lt;\/<\/code><code class=\"xml keyword\">div<\/code><code class=\"xml plain\">&gt;<\/code><\/div>\n<div class=\"line number10 index9 alt1\"><\/div>\n<div class=\"line number11 index10 alt2\"><code class=\"xml plain\">&lt;<\/code><code class=\"xml keyword\">label<\/code><code class=\"xml plain\">&gt; Your Message<\/code><\/div>\n<div class=\"line number12 index11 alt1\"><code class=\"xml spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"xml plain\">[textarea your-message] &lt;\/<\/code><code class=\"xml keyword\">label<\/code><code class=\"xml plain\">&gt;<\/code><\/div>\n<div class=\"line number13 index12 alt2\"><\/div>\n<div class=\"line number14 index13 alt1\"><code class=\"xml plain\">[submit \"Send\"]<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>Awesome!<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Display Contact Form 7 Fields on 2 or More Columns I get this question a lot. \u201cHow can I display my contact form on 2 or 3 columns?\u201d or \u201cWhat are my options to have a contact form with fields side by side?\u201d You get it! The main idea is how to get those text&hellip;<\/p>\n","protected":false},"author":1,"featured_media":1635,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1697","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ideas"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Contact Form 7 Inline Fields - MOOI<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Contact Form 7 Inline Fields - MOOI\" \/>\n<meta property=\"og:description\" content=\"Display Contact Form 7 Fields on 2 or More Columns I get this question a lot. \u201cHow can I display my contact form on 2 or 3 columns?\u201d or \u201cWhat are my options to have a contact form with fields side by side?\u201d You get it! The main idea is how to get those text&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/\" \/>\n<meta property=\"og:site_name\" content=\"MOOI\" \/>\n<meta property=\"article:published_time\" content=\"2019-09-03T18:20:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-01-23T08:32:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mooi.hu\/wp-content\/uploads\/2018\/01\/mooi-webdesign_af4338bfd510781a21667cec5a684a77.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"480\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"mooi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"mooi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/\"},\"author\":{\"name\":\"mooi\",\"@id\":\"https:\/\/mooi.hu\/en\/#\/schema\/person\/6b3a9e82722971ccbbaa052409b0215f\"},\"headline\":\"Contact Form 7 Inline Fields\",\"datePublished\":\"2019-09-03T18:20:20+00:00\",\"dateModified\":\"2021-01-23T08:32:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/\"},\"wordCount\":809,\"image\":{\"@id\":\"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mooi.hu\/wp-content\/uploads\/2018\/01\/mooi-webdesign_af4338bfd510781a21667cec5a684a77.jpg\",\"articleSection\":[\"Ideas\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/\",\"url\":\"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/\",\"name\":\"Contact Form 7 Inline Fields - MOOI\",\"isPartOf\":{\"@id\":\"https:\/\/mooi.hu\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/mooi.hu\/wp-content\/uploads\/2018\/01\/mooi-webdesign_af4338bfd510781a21667cec5a684a77.jpg\",\"datePublished\":\"2019-09-03T18:20:20+00:00\",\"dateModified\":\"2021-01-23T08:32:05+00:00\",\"author\":{\"@id\":\"https:\/\/mooi.hu\/en\/#\/schema\/person\/6b3a9e82722971ccbbaa052409b0215f\"},\"breadcrumb\":{\"@id\":\"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/#primaryimage\",\"url\":\"https:\/\/mooi.hu\/wp-content\/uploads\/2018\/01\/mooi-webdesign_af4338bfd510781a21667cec5a684a77.jpg\",\"contentUrl\":\"https:\/\/mooi.hu\/wp-content\/uploads\/2018\/01\/mooi-webdesign_af4338bfd510781a21667cec5a684a77.jpg\",\"width\":640,\"height\":480},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/mooi.hu\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Contact Form 7 Inline Fields\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mooi.hu\/en\/#website\",\"url\":\"https:\/\/mooi.hu\/en\/\",\"name\":\"MOOI\",\"description\":\"webdesign &amp; development : WordPress  - HTML \/ CSS\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mooi.hu\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/mooi.hu\/en\/#\/schema\/person\/6b3a9e82722971ccbbaa052409b0215f\",\"name\":\"mooi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mooi.hu\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7359072901f7dc3e83492b6815e750a1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7359072901f7dc3e83492b6815e750a1?s=96&d=mm&r=g\",\"caption\":\"mooi\"},\"url\":\"https:\/\/mooi.hu\/en\/author\/mooi\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Contact Form 7 Inline Fields - MOOI","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/","og_locale":"en_US","og_type":"article","og_title":"Contact Form 7 Inline Fields - MOOI","og_description":"Display Contact Form 7 Fields on 2 or More Columns I get this question a lot. \u201cHow can I display my contact form on 2 or 3 columns?\u201d or \u201cWhat are my options to have a contact form with fields side by side?\u201d You get it! The main idea is how to get those text&hellip;","og_url":"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/","og_site_name":"MOOI","article_published_time":"2019-09-03T18:20:20+00:00","article_modified_time":"2021-01-23T08:32:05+00:00","og_image":[{"width":640,"height":480,"url":"https:\/\/mooi.hu\/wp-content\/uploads\/2018\/01\/mooi-webdesign_af4338bfd510781a21667cec5a684a77.jpg","type":"image\/jpeg"}],"author":"mooi","twitter_card":"summary_large_image","twitter_misc":{"Written by":"mooi","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/#article","isPartOf":{"@id":"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/"},"author":{"name":"mooi","@id":"https:\/\/mooi.hu\/en\/#\/schema\/person\/6b3a9e82722971ccbbaa052409b0215f"},"headline":"Contact Form 7 Inline Fields","datePublished":"2019-09-03T18:20:20+00:00","dateModified":"2021-01-23T08:32:05+00:00","mainEntityOfPage":{"@id":"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/"},"wordCount":809,"image":{"@id":"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/#primaryimage"},"thumbnailUrl":"https:\/\/mooi.hu\/wp-content\/uploads\/2018\/01\/mooi-webdesign_af4338bfd510781a21667cec5a684a77.jpg","articleSection":["Ideas"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/","url":"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/","name":"Contact Form 7 Inline Fields - MOOI","isPartOf":{"@id":"https:\/\/mooi.hu\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/#primaryimage"},"image":{"@id":"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/#primaryimage"},"thumbnailUrl":"https:\/\/mooi.hu\/wp-content\/uploads\/2018\/01\/mooi-webdesign_af4338bfd510781a21667cec5a684a77.jpg","datePublished":"2019-09-03T18:20:20+00:00","dateModified":"2021-01-23T08:32:05+00:00","author":{"@id":"https:\/\/mooi.hu\/en\/#\/schema\/person\/6b3a9e82722971ccbbaa052409b0215f"},"breadcrumb":{"@id":"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/#primaryimage","url":"https:\/\/mooi.hu\/wp-content\/uploads\/2018\/01\/mooi-webdesign_af4338bfd510781a21667cec5a684a77.jpg","contentUrl":"https:\/\/mooi.hu\/wp-content\/uploads\/2018\/01\/mooi-webdesign_af4338bfd510781a21667cec5a684a77.jpg","width":640,"height":480},{"@type":"BreadcrumbList","@id":"https:\/\/mooi.hu\/en\/contact-form-7-inline-fields\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/mooi.hu\/en\/"},{"@type":"ListItem","position":2,"name":"Contact Form 7 Inline Fields"}]},{"@type":"WebSite","@id":"https:\/\/mooi.hu\/en\/#website","url":"https:\/\/mooi.hu\/en\/","name":"MOOI","description":"webdesign &amp; development : WordPress  - HTML \/ CSS","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mooi.hu\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/mooi.hu\/en\/#\/schema\/person\/6b3a9e82722971ccbbaa052409b0215f","name":"mooi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mooi.hu\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7359072901f7dc3e83492b6815e750a1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7359072901f7dc3e83492b6815e750a1?s=96&d=mm&r=g","caption":"mooi"},"url":"https:\/\/mooi.hu\/en\/author\/mooi\/"}]}},"_links":{"self":[{"href":"https:\/\/mooi.hu\/en\/wp-json\/wp\/v2\/posts\/1697","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mooi.hu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mooi.hu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mooi.hu\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mooi.hu\/en\/wp-json\/wp\/v2\/comments?post=1697"}],"version-history":[{"count":6,"href":"https:\/\/mooi.hu\/en\/wp-json\/wp\/v2\/posts\/1697\/revisions"}],"predecessor-version":[{"id":2558,"href":"https:\/\/mooi.hu\/en\/wp-json\/wp\/v2\/posts\/1697\/revisions\/2558"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mooi.hu\/en\/wp-json\/wp\/v2\/media\/1635"}],"wp:attachment":[{"href":"https:\/\/mooi.hu\/en\/wp-json\/wp\/v2\/media?parent=1697"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mooi.hu\/en\/wp-json\/wp\/v2\/categories?post=1697"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mooi.hu\/en\/wp-json\/wp\/v2\/tags?post=1697"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}