Merge Tags

Basic Merge Tags

Submission Count {submission:count} – This is used in an HTML field to display to the user how many submissions have been made on the form.
Submission Sequence {submission:sequence} – This merge tag is used to get the submission number of the current user’s submission. This merge tag only populates after the submission data has been saved to the database and requires a Store Submission action to be activated on the form.

User ID {wp:user_id} – This returns the User ID for the logged in user
User First Name {wp:user_first_name} – This returns the First Name for the logged in user
User Last Name {wp:user_last_name} – This returns the Last Name for the logged in user
User Display Name {wp:user_display_name} – This returns the Display Name for the logged in user
User Email {wp:user_email} – This returns the Email address for the logged in user
User URL {wp:user_url} – This returns the information stored as the Website for the logged in user

Site Title {wp:site_title}
 – This returns the Title of the site
Site URL {wp:site_url} – This returns the URL of the site

Admin Email {wp:admin_email} –
This returns the server admin email address set on the WordPress General settings page

Post ID {wp:post_id}
– This returns the ID of the Post/Page the form is on.
Post Title {wp:post_title}– This returns the Title of the Post/Page the form is on.
Post URL {wp:post_url} – This returns the URL of the Post/Page the form is on.
Post Author {wp:post_author} – This returns the Name of the Author of the Post/Page the form is on.
Post Author Email {wp:post_author_email} – This returns the Email of the Author of the Post/Page the form is on.

Date {other:date}
– This records the date at the submission is made. The format of the date is set in the Ninja Forms settings. The data from this merge tag is not populated until after the data is saved in the submission.
Time {other:time} – This records the time at the submission is made. The format of the time is set based of the WordPress language settings for time. The data from this merge tag is not populated until after the data is saved in the submission.

User IP Address {other:user_ip}
 – This returns the IP address the form is being submitted from.
Post Permalink {post:permalink} – This returns the Permalink URL of the Post/Page the form is on.

Query String {querystring:YOUR_KEY}
– The use of this merge tag is documented here.

User Meta {user_meta:YOUR_META_KEY}
– This will return the meta value from the user meta in WordPress for the logged in user associated with the meta key that you include in the merge tag.
Post Meta {post_meta:YOUR_META_KEY} – This will return the meta value from the post meta in WordPress for the current post associated with the meta key that you include in the merge tag.

List Field Merge Tag Modifier
:label – This is only usable in list fields. When a list merge tag ends with :label the label text will be output instead of the value.

Actions Merge Tags:

Fields Table {fields_table} – This returns the labels and submission data* for all of the fields that have had data entered into them.
All Fields Table {all_fields_table}  – This returns the labels and submission data* for all fields, including HTML fields, even if they do not have data submitted into them.

*Note: in the case of List fields, the option labels are returned for the options selected, not the data values of those options.

Plugin Specific Merge Tags

PayPal:
Transaction ID {paypal_express:transaction_id} – This returns the Transaction ID from the PayPal payment. The data from this merge tag is not populated until after the payment is made.

Stripe:
Last 4 {stripe:last4} – This returns the last 4 didgets of the Credit Card from the Stripe payment. The data from this merge tag is not populated until after the payment is made.
Card Type (Brand) {stripe:cardtype} – This returns the Credit Card type from the Stripe payment. The data from this merge tag is not populated until after the payment is made.
Customer ID {stripe:customerID} – This returns the Customer ID from the Stripe payment. The data from this merge tag is not populated until after the payment is made.
Charge ID {stripe:chargeID} – This returns the Charge ID from the Stripe payment. The data from this merge tag is not populated until after the payment is made.

User management:
Password Reset {user_management:password_reset} – This will output a link to your WordPress install’s password reset page  /wp-login.php?action=lostpassword

File Uploads:
Use the merge tag for the File Upload field to output the URL for the File Upload location
Merge Tag Modifiers
:embed
– When a File Upload merge tag ends with :embed the output will be formatted to embed an image.
:link – When a File Upload merge tag ends with :link the output will be formatted as a link.
:url – When a File Upload merge tag ends with :url the output will be formatted as the full URL.
:attachment_id – When a File Upload merge tag ends with :attachment_id the output will be the Attachment ID of the Upload.