Template Variables
HTML Forms provides several template variables you can use in your form content. These form variables will be dynamically replaced when the form is shown. Currently, you can use the following variables.
user
Will be replaced with the specified property of the currently logged-in user.
{{ user.user_email }}
url_params
This will be replaced with a parameter from the page URL, or with an empty string if the specified URL parameter does not exist.
{{url_params.utm_source}}
post
This will be substituted with the specified property of the post that is viewed on the page the form is displayed on.
{{post.ID}}
Related Posts from Our Knowledge Base
HTML Forms has an optional Enable Nonce setting to add the WordPress nonce field to each of your forms. The WordPress nonce provides an extra security and anti-spam layer to your forms. The nonce field helps HTML Forms confirm that a form submission is coming from your site. This is a simple way to add […]
HTML Forms offers support for Google reCAPTCHA v3. The process is simple. Step #1 Generate a Site Key and a Secret Key for your site by registering at https://www.google.com/recaptcha/admin/. Step #2 With your keys in hand, add them to the Google reCAPTCHA v3 fields in the HTML Forms plugin settings screen: Step #3 Confirm your […]