Get access to free tutorials, exclusive content and more.

12 Powerful Merge Tag Examples For Your WordPress Form Submissions

If you routinely receive WordPress form submissions that you can’t identify or need a fast way to personalize email notifications, merge tags are for you!  Use merge tags to retrieve data from different sources within WordPress and populate that data anywhere a merge tag icon is present.  Below are 12 merge tag examples to help you dynamically generate data into any WordPress form.

1.  How to display WordPress form submission data

Looking for a fast way to display your WordPress form submission data?  Insert {all_fields_table} to include labels and submission data for all fields, even HTML fields

Insert {fields_table} to display labels and submission data for all fields that contain submitted data.

Fields Table Merge Tag, merge tag example

Add either merge tag to your email or success action to display submitted data.

2.  Where did this submission come from?

If your website includes a vast number of forms, it can be tricky to keep track of what submissions come from what form.  Using the {form:id} or {form: title} in your email or success message will help keep your submissions organized.

3.  Did my WordPress form submission come from my  WordPress page, post, or website?

If you have many sites containing an expansive number of forms, it can be tough to keep track of where the submissions are coming from.  Appending {wp:post_title}, {wp:post_url}, or {wp:site_url} to the beginning of your email notification/confirmation will help you to identify what page, post or site the WordPress form was submitted from.

  • {wp:site_url} – returns the URL of the site
  • {wp:post_title} – returns the Title of the Post/Page the form is on.
  • {wp:post_url} – returns the URL of the Post/Page the form is on.

4.  How do I include the label for my select/dropdown fields?

If your form includes a lot of select/dropdown fields you may have noticed that only the values appear in the submission.  To get around that add, :label at the end of the select/dropdown field to display the label instead of the value.

If you want to include both the label and the value of an individual field, add the select/dropdown field with the label and one without.

Label Merge Tag identifier, merge tag example

5.  Email recipient merge tag examples

An email action can be used to send an email to ANYONE after your form is submitted by a user.  Here are three unique merge tag examples to dynamically add recipients.

Set up the email notification to go to your WordPress administrator?

Typically the WordPress administrator is the individual who is in charge of overseeing your WordPress website.  If this person also happens to be in charge of forms you can add them by inserting the {wp:admin_email} merge-tag into the “To” field.  The tag will return the server admin email address set in the WordPress General settings page.

Sending an email confirmation to your logged-in user.

Asking users for the least amount of information possible when filling out a form is a marketing standard.  So, if you have a WordPress form that requires your user to be logged in add the, {wp:user_email} merge tag for the “To” field.  Doing so removes the need for them to re-enter their email address yet, still receive a confirmation upon submission.

How to send an email notification to go to your post/page author.

Send notifications to your page or post author, by adding the {wp:post_author_email} to the “To” field in your WordPress comment form.  This will allow them to receive valuable insights into what their readers think about their work.

6.  Format your WordPress notifications to include the date and time

Add the {other:date} and {other:time} to your form notifications to help you identify submissions trends.

Date and Time Merge tags, merge tag examples

7.  How do I find out how many users have already submitted entries for this WordPress form?

Add the {submission:count} merge tag to your email or success message action to depict the number of form submissions that have been made.

8.  How do I find out how many times a specific user has submitted a form?

Use the {submission:sequence} merge tag to show how many submissions a specific user has made.  Just be aware that {submission: sequence} merge tag will only populate after the submission has been saved to the database.  So make sure the Record Submission action is enabled for this merge tag to work.

9.  PayPal merge tag example: displaying the transaction ID

The transaction data from PayPay will not populate until after the payment has been made.  Display the transaction ID by inserting the {paypal_express:transaction_id} merge tag into an email or success message action.

10.  How to send users a password reset link

How to Build Custom Login Forms in WordPress Effortlessly showed you how to add the {user_management:password_reset} merge tag to your custom login form.  But, did you know you can include {user_management:password_reset} in your email notification too?

Doing so sends users a reset link directly to their inbox?  The link redirects users to your WordPress installs password reset page  /wp-login.php?action=lostpassword.

Password Reset

11.  Logout link merge tag example

Add {user_management:logout} merge tag ( only available with the User Management add-on ) to display a logout link in your success message.  The link gives users the opportunity to log out of your website after completing the WordPress form.

logout link merge tag

12.  Attach an uploaded image to your confirmation email

Add an uploaded image to your confirmation email by inserting the :embed modifier to the file uploads merge tag.  Select the merge tag through the merge-tag icon  >  File Uploads > File Upload Embed.

file upload embed

Congrats!  The mystery of merge tags is no more 🙂

Now that you know how to use merge tags to customize your WordPress form submissions.  Check out our documentation, for a complete overview.  Remember, merge tags exist in our form builder anywhere you see a merge tag icon.

Want more merge tag examples?  Find out how you can use merge tags to rename uploaded files, and create custom directories with the Complete Guide to Adding File Upload Field to Your Form or read How to convert WordPress form submissions to PDF  to learn how to use merge tags to create customized PDF submissions and build customized PDFs.

If you don’t want to miss other posts like this, make sure you sign up for our newsletter!  You’ll get access to the latest blog posts and exclusive news from Ninja Forms!