{"id":43953,"date":"2019-06-25T14:00:58","date_gmt":"2019-06-25T19:00:58","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/?p=43953"},"modified":"2024-03-22T16:40:52","modified_gmt":"2024-03-22T20:40:52","slug":"how-to-use-contact-form-7-to-add-a-form","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/","title":{"rendered":"How to Use Contact Form 7 to Create a WordPress Form"},"content":{"rendered":"<p>When you\u2019re on a company\u2019s website and decide that you want to contact them directly, you\u2019ll likely look for contact information and <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/plugins\/wordpress-guide-to-social-media\/\">social media<\/a> links. You\u2019ll usually find an email address, phone number, and\/or contact form. Contact forms are a popular method for feedback and customer service requests for many reasons:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Hide your contact email address from <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/block-bad-bots\/\">web crawling robots<\/a> that may later use it for business email compromise (BEC) and other phishing attacks.<\/li>\n\n\n\n<li>Force users to provide required information with a specific format and alphanumeric character limits. For example, ensure users provide you a phone number with an area and country code.<\/li>\n\n\n\n<li>Easily manage user contacts with integrated <a href=\"https:\/\/www.inmotionhosting.com\/blog\/what-is-crm\/\">customer relationship management (CRM)<\/a> solutions.<\/li>\n\n\n\n<li>Secure email inquiries with CAPTCHA and other anti-spam methods to reduce social engineering attacks.<\/li>\n<\/ul>\n\n\n\n<p>You can\u2019t do all of that by providing an email address on your website. Companies using WordPress and other content management systems (CMSs) can do this more easily with plugins or modules instead of developing a <a href=\"https:\/\/www.inmotionhosting.com\/support\/email\/using-the-php-mail-function-to-send-emails\/\">basic PHP mail() contact form<\/a>.<\/p>\n\n\n\n<p><a href=\"https:\/\/contactform7.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Contact Form 7<\/a> is one of many options for WordPress forms, but it is among the most popular. If you look at the <a href=\"https:\/\/wordpress.org\/plugins\/contact-form-7\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress.org plugin page<\/a>, there are over 5 million active installations of the plugin. Contact Form 7\u2019s biggest advantage over <a href=\"https:\/\/www.inmotionhosting.com\/support\/product-guides\/weforms\/\">weForms<\/a>, <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/plugins\/wpforms\/\">WPForms<\/a>, and others is the list of free customization and input validation options available to those willing to code it.<\/p>\n\n\n\n<p>Below we\u2019ll cover:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#install\">Installing Contact Form 7<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"#dashboard\">Dashboard<\/a><\/li>\n\n\n\n<li><a href=\"#wpcli\">WP-CLI<\/a><\/li>\n\n\n\n<li><a href=\"#manual\">Manually<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"#create\">How to Create a Form using Contact Form 7<\/a><\/li>\n\n\n\n<li><a href=\"#add\">Adding Contact Form 7<\/a><\/li>\n\n\n\n<li><a href=\"#redirect\">Redirecting Users<\/a><\/li>\n\n\n\n<li><a href=\"#secure\">Securing Contact Form 7 forms<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"#input\">Data input validation<\/a><\/li>\n\n\n\n<li><a href=\"#captcha\">reCAPTCHA<\/a><\/li>\n\n\n\n<li><a href=\"#same\">Same domain email<\/a><\/li>\n\n\n\n<li><a href=\"#reply\">Reply-to<\/a><\/li>\n\n\n\n<li><a href=\"#comment\">Comment moderation<\/a><\/li>\n\n\n\n<li><a href=\"#email\">Email authentication<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n<div class=\"jumbotron\">\r\n<p>Improve the performance and security of your WordPress website with our <a href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\/wordpress?mktgp=t&irgwc=1&affiliates=5001860&utm_campaign=Jumbotron&utm_source=supportcenter&utm_medium=cta&utm_term=wp-hosting-performance\">WordPress VPS Hosting<\/a> plans. Featuring blazing fast servers with advanced caching, 99.99% uptime, and a robust toolkit developed by WordPress experts.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/legacy\/images\/check.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Improve Core Web Vitals    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/legacy\/images\/check.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Free SSL &amp; Dedicated IP    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/legacy\/images\/check.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>Advanced Server Caching    <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/design.inmotionhosting.com\/assets\/legacy\/images\/check.svg\" alt=\"check mark\" width=\"24\" height=\"24\" \/>US &amp; EU Data Centers<\/p>\r\n<p><a class=\"btn btn-primary btn-lg\" href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\/wordpress?mktgp=t&irgwc=1&affiliates=5001860&utm_campaign=Jumbotron&utm_source=supportcenter&utm_medium=cta&utm_term=wp-hosting-performance\">VPS for WordPress<\/a><\/p>\r\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install\">Installing the Contact Form 7 Plugin<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"dashboard\">Install from the Dashboard<\/h3>\n\n\n\n<ol class=\"article_list wp-block-list\">\n<li><a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/logging-into-wordpress-dashboard\/\">Log in to your WordPress dashboard<\/a>.<\/li>\n\n\n\n<li><a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/plugins\/install-wordpress-plugins\/\">Install the Contact Form 7 plugin<\/a> and activate it.<\/li>\n\n\n\n<li>On the left, select <strong>Contact<\/strong> to manage contact forms and integrations.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"wpcli\">Install via WP-CLI<\/h3>\n\n\n\n<ol class=\"article_list wp-block-list\">\n<li><a href=\"https:\/\/www.inmotionhosting.com\/support\/server\/ssh\/do-you-provide-ssh-access\/\" target=\"_blank\" rel=\"noreferrer noopener\">Log into SSH<\/a>.<\/li>\n\n\n\n<li><a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/wp-cli\/install-a-plugin-using-wp-cli\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install and activate Contact Form 7<\/a> using the following command: <pre>wp plugin install contact-form-7 --activate<\/pre><\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"manual\">Install Manually<\/h3>\n\n\n\n<ol class=\"article_list wp-block-list\">\n<li>To install the plugin manually, download the plugin zip file from <a href=\"https:\/\/wordpress.org\/plugins\/contact-form-7\/#installation\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress.org\/plugins<\/a>.<\/li>\n\n\n\n<li><a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/how-to-upload-a-file-using-file-manager-in-cpanel\/\">Upload the zip file<\/a> and <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/cpanel\/compressing-uncompressing-files\/#uncompress\">extract the folder<\/a> to the website\u2019s <code>wp-content\/plugins<\/code> folder.<\/li>\n\n\n\n<li>Log into your WordPress site or use the WP-CLI command to activate the plugin:<pre>wp plugin activate contact-form-7<\/pre><\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"create\">How to Create a Form using Contact Form 7<\/h2>\n\n\n\n<ol class=\"article_list wp-block-list\">\n<li>In the WordPress administration dashboard, select <strong>Contact<\/strong> on the left. You\u2019ll be redirected to your list of contact forms.<\/li>\n\n\n\n<li>You can click on the default contact form to edit it. Alternatively, you can click <strong>Add New<\/strong> at the top to create a new one. You can view <a href=\"https:\/\/contactform7.com\/editing-form-template\/\" target=\"_blank\" rel=\"noreferrer noopener\">Contact Form 7 documentation<\/a> to use the form.<\/li>\n\n\n\n<li>Change the name at the top of the <em>Edit Contact Form<\/em> page to one you\u2019ll easily understand if listed among others in the contact forms list. This title isn\u2019t public facing.<\/li>\n\n\n\n<li>Edit the form to meet your needs. To add a new form field, or form-tag, click where in the form you want to add the new field. Then, select the appropriate button (text, email, URL, etc.) and make changes as needed before selecting <strong>Insert Tag<\/strong>.<\/li>\n\n\n\n<li>To add label text with a mail-tag, ensure you wrap them within a <code>&lt;label&gt;<\/code> tag.<\/li>\n\n\n\n<li><strong>Save<\/strong> changes at the bottom.<\/li>\n\n\n\n<li>Select the <strong>Mail<\/strong> tab to configure how the email is sent.<\/li>\n\n\n\n<li>Change the email address for the recipient of completed forms in the <em>To<\/em> field.<\/li>\n\n\n\n<li>In the <em>From<\/em> field, set the sender address for submissions from this form. You can set it to use a dedicated sender email address to make <a href=\"https:\/\/www.inmotionhosting.com\/support\/email\/setup-email-filters\/\">email filtering<\/a> easier (e.g. <code>My Blog Contact Form &lt;noreply@example.com&gt;<\/code>) or the email address provided in the submitted form via the mail tag (e.g. <code>[your-email]<\/code>).<\/li>\n\n\n\n<li>Set the <em>Subject<\/em> field for contact form submissions. Similar to the <em>From<\/em> field, you can use a preset subject or dynamic subject that uses form-tags from the contact form.<\/li>\n\n\n\n<li>You can add other email headers in the <em>Additional headers<\/em> section including CC, BCC, message-ID, content-type, organization, etc.<\/li>\n\n\n\n<li>Edit the <em>Message body<\/em> to a format that allows you to easily intake the form submission. Ensure you use all mail-tags listed above the <em>To<\/em> field.<\/li>\n\n\n\n<li><strong>Save<\/strong> your changes. If a mail-tag listed above the <em>To<\/em> field is highlighted in bold, that means it is used in the form but not added in the Mail tab anywhere. Add it somewhere and save again before continuing.<\/li>\n\n\n\n<li>Select the <strong>Messages<\/strong> tab.<\/li>\n\n\n\n<li>Here, you can change the form notification for multiple situations including successful submission or when a field is filled in incorrectly.<\/li>\n\n\n\n<li><strong>Save<\/strong> changes once done.<\/li>\n\n\n\n<li>Select the <strong>Additional Settings<\/strong> tab to <a rel=\"noreferrer noopener\" href=\"https:\/\/contactform7.com\/additional-settings\/\" target=\"_blank\">add other code<\/a> that affects how the contact form behaves such as redirecting to another page afterwards.<\/li>\n\n\n\n<li><strong>Save<\/strong> changes.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"680\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-default-form-1024x680.png\" alt=\"Default Contact Form 7 form\" class=\"wp-image-61792\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-default-form-1024x680.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-default-form-300x199.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-default-form-768x510.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-default-form.png 1418w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p>You can add the shortcode at the top of the page anywhere that will convert it correctly \u2013 posts, pages, <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/313-use-shortcodes-within-text-widgit\/\">text widgets<\/a>, etc. The shortcode will resemble <code>[contact-form-7 id=\"5\" title=\"Contact Form Title\"]<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"add\">How to Add a Contact Form<\/h2>\n\n\n\n<p>There are two main ways to add a contact form to your website:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/create-edit-pages-posts-wordpress\/\" target=\"_blank\" rel=\"noreferrer noopener\">Create or edit a post or page<\/a> to add the Contact Form 7 shortcode to a shortcode block.<\/li>\n\n\n\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/gutenberg\/add-gutenberg-block-functionality-wordpress-widget\/\" target=\"_blank\">Install the Gutenberg plugin<\/a> to add contact forms in text widgets.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"951\" height=\"600\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-shortcode.png\" alt=\"Contact Form 7 shortcode \" class=\"wp-image-61791\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-shortcode.png 951w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-shortcode-300x189.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-shortcode-768x485.png 768w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"redirect\">Redirect Users After Submission<\/h2>\n\n\n\n<p>One of the additional settings you can add to a contact form will redirect users to specific webpage after completing a contact form.<\/p>\n\n\n\n<ol class=\"article_list wp-block-list\">\n<li>Edit a contact form.<\/li>\n\n\n\n<li>Select the <strong>Additional Settings<\/strong> tab.<\/li>\n\n\n\n<li>Type the following, replacing <code>yourdomain.com<\/code> with your preferred redirect URL: <pre>&lt;script&gt;\n document.addEventListener( 'wpcf7mailsent', function( event ) {\nlocation = 'https:\/\/yourdomain.com\/'; \n}, false ); \n&lt;\/script&gt;<\/pre><\/li>\n\n\n\n<li>Press <strong>Save<\/strong>. The number beside <em>Additional Settings<\/em> matches the number of lines below.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"546\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2019\/06\/contact-form-7-additional-settings-redirect-1024x546.png\" alt=\"Redirect Users\" class=\"wp-image-61789\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2019\/06\/contact-form-7-additional-settings-redirect-1024x546.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2019\/06\/contact-form-7-additional-settings-redirect-300x160.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2019\/06\/contact-form-7-additional-settings-redirect-768x410.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2019\/06\/contact-form-7-additional-settings-redirect.png 1200w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p>If the contact form doesn\u2019t redirect properly, you may need to troubleshoot what theme or plugin(s) are affecting your JavaScript settings. Otherwise, you can install <a rel=\"noreferrer noopener\" href=\"https:\/\/wordpress.org\/plugins\/wpcf7-redirect\/\" target=\"_blank\">Redirection for Contact Form 7<\/a>, by a different developer, which adds another tab for managing contact forms.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"465\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/redirection-for-contact-form-7-1024x465.png\" alt=\"Redirection for Contact Form 7 settings\" class=\"wp-image-61790\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/redirection-for-contact-form-7-1024x465.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/redirection-for-contact-form-7-300x136.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/redirection-for-contact-form-7-768x349.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/redirection-for-contact-form-7.png 1430w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"secure\">How to Secure Contact Forms<\/h2>\n\n\n\n<p>As mentioned in our <a href=\"https:\/\/www.inmotionhosting.com\/support\/email\/using-the-php-mail-function-to-send-emails\/\" target=\"_blank\" rel=\"noreferrer noopener\">PHP contact form<\/a> article, contact forms with a plugin are usually a more secure option when using a CMS. To further benefit from that WordPress security, here are some ways to better secure form submissions with data validation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"input\">Data Input Validation<\/h3>\n\n\n\n<p>Text input fields should have character limits to prevent cross-site scripting (XSS) and similar cyber attacks:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/contactform7.com\/text-fields\" target=\"_blank\" rel=\"noreferrer noopener\">Text sections<\/a> use maxlength:# \u2013 e.g. <code>[text* your-message maxlength:50]<\/code>.<\/li>\n\n\n\n<li><a href=\"https:\/\/contactform7.com\/number-fields\/\" target=\"_blank\" rel=\"noreferrer noopener\">Number sections<\/a> use max:# \u2013 e.g. <code>[number* your-number max:99]<\/code>.<\/li>\n\n\n\n<li><a href=\"https:\/\/contactform7.com\/file-uploading-and-attachment\/\" target=\"_blank\" rel=\"noreferrer noopener\">File upload sections<\/a> use <code>limit:#mb<\/code>, <code>limit:#kb<\/code>, or <code>limit:#<\/code> (bytes) and restrict file types with filetypes:##|## \u2013 e.g. <code>[file your-file filetypes:pdf|txt limit:5mb]<\/code>.<\/li>\n\n\n\n<li>Set anti-spam plugin <a href=\"https:\/\/contactform7.com\/spam-filtering-with-akismet\/\" target=\"_blank\" rel=\"noreferrer noopener\">Akismet<\/a> to scan fields for spam by selecting the <strong>Akismet<\/strong> checkbox in a form-tag generator.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"cpatcha\">Use reCAPTCHA<\/h3>\n\n\n\n<p>Contact Form 7 officially supports <a href=\"https:\/\/contactform7.com\/captcha\/\" target=\"_blank\" rel=\"noreferrer noopener\">reCAPTCHA v3 for validation<\/a>, not Really Simple CAPTCHA. Once you <a href=\"https:\/\/contactform7.com\/recaptcha\/\" target=\"_blank\" rel=\"noreferrer noopener\">register your website with reCAPTCHA<\/a>, hover over <em>Contact<\/em> and select <strong>Integration<\/strong>. Then, under <em>reCAPTCHA<\/em>, select <strong>Setup Integration<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"same\">Use the Same Domain in From Field<\/h3>\n\n\n\n<p>If the email account in the <em>From<\/em> field doesn\u2019t match the website domain, email providers will see this and may mark it as spam. You can check this in the <em>Mail<\/em> section.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"reply\">Reply-To Address<\/h3>\n\n\n\n<p>You may want email conversations continued through an email account other than what\u2019s specified in the <em>From<\/em> field. If so, change the <code>Reply-To<\/code> email in the <em>Additional Headers<\/em> section to another email account. Alternatively, you can add a CC line which may be preferable over creating an <a href=\"https:\/\/www.inmotionhosting.com\/support\/email\/setup-email-filters\/\" target=\"_blank\" rel=\"noreferrer noopener\">email filter<\/a> or <a href=\"https:\/\/www.inmotionhosting.com\/support\/email\/set-up-email-forwarder\/\" target=\"_blank\" rel=\"noreferrer noopener\">forwarder in cPanel<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"comment\">Comment Moderation<\/h3>\n\n\n\n<p>Along with using an <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/plugins\/top-anti-spam-plugins-for-wordpress\/\" target=\"_blank\" rel=\"noreferrer noopener\">anti-spam plugin such as Akismet<\/a>, you can edit the Comment Moderation section in the WordPress dashboard that Contact Form 7 will use to moderate sent email.<\/p>\n\n\n\n<ol class=\"article_list wp-block-list\">\n<li>On the left, select <strong>Discussion<\/strong> under <em>Settings<\/em>.<\/li>\n\n\n\n<li>Specify comments and IP addresses to block in the <strong>Comment Moderation<\/strong> text box.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"199\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/wordpress-comment-moderation-1024x199.png\" alt=\"WordPress Comment Moderation\" class=\"wp-image-61787\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/wordpress-comment-moderation-1024x199.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/wordpress-comment-moderation-300x58.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/wordpress-comment-moderation-768x149.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/wordpress-comment-moderation-1536x299.png 1536w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/wordpress-comment-moderation.png 1708w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"email\">Email Authentication<\/h3>\n\n\n\n<p>Enabling DKIM, SPF, DMARC, and PTR ensure your emails aren\u2019t marked as spam. For more info on how to do this in cPanel, please see our <a rel=\"noreferrer noopener\" href=\"https:\/\/www.inmotionhosting.com\/support\/email\/strengthen-overall-email-authentication\/\" target=\"_blank\">Block Spam Email in cPanel and Strengthen Email Authentication<\/a> guide.<\/p>\n\n\n\n<p>Also, consider using <a rel=\"noreferrer noopener\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/plugins\/wp-mail-smtp\/\" target=\"_blank\">WP Mail SMTP<\/a> which is less likely to be marked as spam than the default PHP mail.<\/p>\n\n\n\n<p>For more information on securing your WordPress website, check out <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/plugins\/recommended-security-plugins\/\" target=\"_blank\" rel=\"noreferrer noopener\">our recommended security plugins<\/a> and <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/plugins\/recommended-wordpress-backup-plugins\/\" target=\"_blank\" rel=\"noreferrer noopener\">backup solutions<\/a>. You can also consider using the <a href=\"https:\/\/sucuri.net\/lp\/promo\/inmotion\/?clickid=WWNTIZS7QxyLT9tQy%3ASR0UvEUkBWzkXLhTDQUQ0\" target=\"_blank\" rel=\"noreferrer noopener\">Sucuri<\/a> web application firewall (WAF) for enhanced server security.<\/p>\n\n\n\n<p>Learn how to make <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/plugins\/accessible-wordpress-contact-forms\/\">accessible WordPress contact forms<\/a> or more possibilities in our <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/\">WordPress Education Channel<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you&#8217;re on a company&#8217;s website and decide that you want to contact them directly, you&#8217;ll likely look for contact information and social media links. You&#8217;ll usually find an email address, phone number, and\/or contact form. Contact forms are a popular method for feedback and customer service requests for many reasons: You can&#8217;t do all<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/\"> Read More ><\/a><\/p>\n","protected":false},"author":57014,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[56],"tags":[],"class_list":["post-43953","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Use Contact Form 7 to Create a WordPress Form<\/title>\n<meta name=\"description\" content=\"Learn how to install Contact Form 7 and add secure contact forms with input validation, comment moderation, and email authentication methods.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Use Contact Form 7 to Create a WordPress Form\" \/>\n<meta property=\"og:description\" content=\"Learn how to install Contact Form 7 and add secure contact forms with input validation, comment moderation, and email authentication methods.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-06-25T19:00:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-22T20:40:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-default-form-1024x680.png\" \/>\n<meta name=\"author\" content=\"InMotion Hosting Contributor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InMotion Hosting Contributor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/\"},\"author\":{\"name\":\"InMotion Hosting Contributor\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\"},\"headline\":\"How to Use Contact Form 7 to Create a WordPress Form\",\"datePublished\":\"2019-06-25T19:00:58+00:00\",\"dateModified\":\"2024-03-22T20:40:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/\"},\"wordCount\":1350,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-default-form-1024x680.png\",\"articleSection\":[\"WordPress Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/\",\"name\":\"How to Use Contact Form 7 to Create a WordPress Form\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-default-form-1024x680.png\",\"datePublished\":\"2019-06-25T19:00:58+00:00\",\"dateModified\":\"2024-03-22T20:40:52+00:00\",\"description\":\"Learn how to install Contact Form 7 and add secure contact forms with input validation, comment moderation, and email authentication methods.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/#primaryimage\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-default-form.png\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-default-form.png\",\"width\":1418,\"height\":942},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Use Contact Form 7 to Create a WordPress Form\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644\",\"name\":\"InMotion Hosting Contributor\",\"description\":\"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!\",\"sameAs\":[\"https:\/\/www.linkedin.com\/company\/inmotion-hosting\/\",\"https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting\"],\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Use Contact Form 7 to Create a WordPress Form","description":"Learn how to install Contact Form 7 and add secure contact forms with input validation, comment moderation, and email authentication methods.","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:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/","og_locale":"en_US","og_type":"article","og_title":"How to Use Contact Form 7 to Create a WordPress Form","og_description":"Learn how to install Contact Form 7 and add secure contact forms with input validation, comment moderation, and email authentication methods.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2019-06-25T19:00:58+00:00","article_modified_time":"2024-03-22T20:40:52+00:00","og_image":[{"url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-default-form-1024x680.png","type":"","width":"","height":""}],"author":"InMotion Hosting Contributor","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"InMotion Hosting Contributor","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/"},"author":{"name":"InMotion Hosting Contributor","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644"},"headline":"How to Use Contact Form 7 to Create a WordPress Form","datePublished":"2019-06-25T19:00:58+00:00","dateModified":"2024-03-22T20:40:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/"},"wordCount":1350,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-default-form-1024x680.png","articleSection":["WordPress Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/","name":"How to Use Contact Form 7 to Create a WordPress Form","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/#primaryimage"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-default-form-1024x680.png","datePublished":"2019-06-25T19:00:58+00:00","dateModified":"2024-03-22T20:40:52+00:00","description":"Learn how to install Contact Form 7 and add secure contact forms with input validation, comment moderation, and email authentication methods.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/#primaryimage","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-default-form.png","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2020\/10\/contact-form-7-default-form.png","width":1418,"height":942},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/how-to-use-contact-form-7-to-add-a-form\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Use Contact Form 7 to Create a WordPress Form"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/f9a4fc454cd1df128ee8e898d30d4644","name":"InMotion Hosting Contributor","description":"InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!","sameAs":["https:\/\/www.linkedin.com\/company\/inmotion-hosting\/","https:\/\/x.com\/https:\/\/twitter.com\/InMotionHosting"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/inmotion-hosting-contributor\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":{"id":56,"name":"WordPress Tutorials","slug":"wordpress","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/wordpress\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/43953","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/57014"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=43953"}],"version-history":[{"count":13,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/43953\/revisions"}],"predecessor-version":[{"id":123394,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/43953\/revisions\/123394"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=43953"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=43953"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=43953"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}