Special mailing tags for Contact Form 7

By now you probably know that Contact Form 7 is the most installed WordPress plugin ever, for several reasons, but the main one is because:

  • WordPress doesn’t include a contact form by default.
  • Contact Form 7 is a simple and easy to use form plugin.
  • It offers free features that are paid for in other plugins.
  • There are hundreds, if not thousands, of additional plugins and tricks for Contact Form 7.

And all this despite the fact that its interface is zero intuitive, even intimidating for novice users.

But the reality is that it is the real king of WordPress plugins, at the moment totally unbeatable.

Leaving this aside, as a mere introduction, today what I wanted to tell you is that there are a number of special tags that you can use in Contact Form 7 to customize the confirmation emails that the plugin sends.

I’m not talking about the default tags that the form generates and we must use in the emails that Contact Form 7 sends, but special tags that you can use in any form, no matter what fields it contains.

I discovered them relatively recently, and I have to admit that some of them have been very useful to me, some for security reasons, others to track where I am contacted from, etc.

So here you have the special email tags of Contact Form 7, with the explanation of what each one is for. I’m sure you’ll discover one that will make your day.

Special Contact Form 7 labels for mailings

  • [_remote_ip] – This tag will show the IP address of the person who submitted the form.
  • [_user_agent] – This tag will display the browser information of the person who submitted the form.
  • [_url] – This tag will display the URL of the page where the submitted form is located.
  • [_date] – This tag displays the date the form was submitted.
  • [_time] – This tag displays the time of form submission.
  • [_invalid_fields] – This tag shows the number of fields of the form with invalid data, useful for debugging errors in the mail configuration.
  • [_serial_number] – This tag displays a numeric string that is automatically incremented, as a form submission number. It requires the Flamingo plugin, the Contact Form 7 add-on for reviewing and managing form submissions, to be installed.

Special Contact Form 7 tags related to the entry or page

These special tags provide information about the post or page containing the contact form.

Note that these tags only work if the form is within the content of a post or page. If the form is in a widget or directly in the theme template nothing will be displayed.

  • [_post_id] – This tag will display the ID of the post/page.
  • [_post_name] – This tag will show the slug of the post/page.
  • [_post_title] – This tag displays the title of the post/page.
  • [_post_url] – This tag displays the URL of the post/page….
  • [_post_author] – This tag displays the name of the author of the post/page….
  • [_post_author_email] – This tag displays the email address of the author of the post/page…

Contact Form 7 special site-related Contact Form 7 tags

These special tags provide information about the website where the contact forms are located.

They are especially useful when you want to reuse form templates on several websites, as you do not have to manually enter site information, but it is generated automatically and dynamically.

  • [_site_title] – This tag shows the title of the site.
  • [_site_description] – This tag shows the short description (slogan) of the web.
  • [_site_url] – This tag displays the front page URL of the site.
  • [_site_admin_email] – This tag displays the email address of the main administrator of the site.

Contact Form 7 special user-related Contact Form 7 tags

These tags provide information on who submitted the form if they were logged in as a registered user of the site at the time of submitting the form.

As these tags only work when the submitter has an account on the site and is logged in, it is recommended to use them only in forms intended for registered users.

  • [_user_login] – This tag shows the user name.
  • [_user_email] – This tag displays the user’s email address.
  • [_user_url] – This tag displays the URL of the user’s website.
  • [_user_first_name] – This tag displays the user’s first name.
  • [_user_last_name] – This tag displays the user’s last name.
  • [_user_nickname] – This tag displays the user’s nickname.
  • [_user_display_name] – This tag displays the user’s public name.

Example of using special mailing labels in Contact Form 7

An example of the use of some of these tags would be as in the following screenshot…

Just an idea, I’m sure you can come up with dozens of interesting uses for these labels.

How useful was this post?

Click on a smiley to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
Skip to content