A relatively unknown feature of the plugin is the fact that you can use certain variables inside your form, your form success and error message or even the checkbox label text for some dynamic content.

The variable will be replaced with a certain value, like the current number of total subscribers on the selected list or the email of the person who just filled out your sign-up form.

How to use dynamic variables

Just include the variable in your form and the plugin will automatically replace it with the corresponding value. If the value is not known, the plugin will replace it with an empty string.

Example 1: successfully subscribed message with email
It can help to show the email address visitors used for a pointer as to in which email inbox they can find the confirmation email. To do that, use {email} inside your success message.

Thank you! Please check the inbox of {email} for a confirmation email.

Example 2: form with number of subscribers

<p>
  Join {subscriber_count} others, stay updated by subscribing to our newsletter.
</p>

Example 3: data from URL
Sometimes you want to prefill your form fields with data from the URL (or other data present in the current request).

You can use the {data key="NAME"} shortcode for that, where the key attribute tells the plugin which request variable to use.

Here’s an example grabbing fname en email from the URL.

URL: https://..../?email=danny@email.com&fname=Danny

<p>
  <input type="text" name="FNAME" value="{data key="FNAME"}" />
</p>
<p>
  <input type="email" name="EMAIL" value="{data key="EMAIL"}" />
</p>

Available variables

The following variables are available.

{data key='UTM_SOURCE'} Data from the URL or a submitted form.
{cookie name='my_cookie'} Data from a cookie.
{subscriber_count} Number of subscribers on the selected list(s)
{email} Email address of the current visitor (if known).
{current_url} URL of the current page.
{current_path} Path of the current page.
{date} Current date.
{time} Current time.
{language} Current site language.
{ip} Visitor's IP address. Example: 127.0.0.1.
{user property='user_email'} Property of the currently logged-in user.
{post property='ID'} Property of the current page or post.