How to Use Email Variables in Shack Forms

3 Things to Know About Using Email Variables in Shack Forms

Shack Forms is incredibly flexible and customizable Joomla form extension. It allows you to easily customize or personalize emails sent to form submitters or administrators.

You achieve this by using email variables. In this blog post, you will learn 3 things to know about using email variables in Shack Forms.


Video on using Variables with Shack Forms


#1. What is a Shack Forms email variable?

A Shack Form email variable is a short-code. Use this little snippet of code to:

  • Personalize the emails sent by your Shack Form. For example, add to the email the submitter name, email address, or their Joomla username.
  • Add some server os site-related data into the emails sent by your Shack Form. For example, add to the email your site name, or the URL of the page with the submitted form. You will learn more about what data you can add below.

Click here to read more about variables in Shack Forms.

Let's take a look at one example.

On the screenshot below, you can see that I used one of such short-codes. I added it to the text email of the auto-reply being sent to the form submitter:

email variable with user name

When the form sender opens this auto-reply in their email client, they will see their actual name in it:

the autoreply received

Note: Please, keep in mind that auto-replies don't work by default. You need to enable them in the form's settings.


#2. The two parts of a Shack Forms email variable

To work with the Shack Forms email variables, you need to learn what an email variable short-code consists of.

A Shack Forms email variable consists of the two parts divided by a dot.

Both parts have to be placed between the curly brackets.

the two parts of email variable

The field_alias bit between the opening curly bracket and the dot determine what information this email variable will display in auto-reply.

The .value bit remains intact.

You need to replace the field_alias text with the alias of the field which data you would like to be inserted in an auto-reply.

For example, you would like to insert the sender's name, as they entered it into the "Name" field.

You would need to know the alias of the "Name" field. Let's say the alias is name. You then enter {name.value} in your auto-reply text where you would like to display the form sender's name.

Once the sender submits their form, they will receive a personalized auto-reply referring to them by their name. 


#3. What email variables are available in Shack Forms?

You can find what email variables are available for you checking your Shack Form settings.

You would need to go to the Email Template tab. There you will find the Email variables setting. Click the Show / Hide button.

the email variables button

You will see the email variables dropped down:

10 some email variables

Below is the list of the email variables you may want to use in your Shack Form auto-replies:

  • {name} - User name
  • {email} - User email
  • {username} - Joomla Username if logged in
  • {sent_on} - date and time 
  • {ip_address} - User IP address
  • {browser} - User browser name 
  • {user_agent} - The user agent string from the browser
  • {screen_resolution} - User screen resolution 
  • {title} - title of page 
  • {url} - page URL 
  • {site_name} - site name 
  • {mailto_name} - name of recipient selected by User from 'Mail to list' field 
  • {ticket} - formatted ticket 
  • {files} - links to uploaded files if 'Attachment type' set to : 'Links to files'

What's Next?

Save $1,000's when you sign up to Joomlashack's Everything Club.

You will get access to all our 32 extensions, and legendary support!

  Click here to join the Everything Club