Update to Template Variables

We have recently made some updates to our variables feature.

Default values

You can now make a variable have a default value.

So instead of “Hey {{form.First_Name}},”
You could use “Hey {{form.First_Name | default:’there’}},”

This would insert “there” as a default value if there is nothing typed into the “First_Name” form field.

URL encode

Sometimes, URL’s break if used as part of a variable.

For example, if you had a job title form field and the value was “Chief Executive Officer” that would cause the URL to stop functioning.

To fix this, use the URL encode variable option to make sure your link keeps working.
http://google.com?q={{form.Query | url_encode}}

Spaces in variables

One final thing to note is ‘spaces’ have no effect on variables.
Example – {{Hey}} is the same as {{ Hey }} and also {{Hey }}

You can find more information in our variables help article here.

Tagged:

Leave A Comment?