Placeholders
A placeholder is a code in curly brackets that JoomForms replaces with real data. They work in emails (subject, message and addresses), the thank-you message, the return URL, the layout, the directory and many plugin settings.
Field placeholders
Use the field's Name before the colon. For a field named Email:
| Placeholder | Becomes |
|---|---|
{Email:value} |
What the visitor entered. |
{Email:caption} |
The field's caption. |
{Email:name} |
The field's name. |
{Email:description} |
The field's description, as text. |
{Email:descriptionhtml} |
The description with its HTML. |
Fields with items (drop-down, checkboxes, radio buttons) also have {Name:text}, the label of the chosen item instead of its value, and {Name:price} on payment fields.
File uploads have {Name:path} (the web address of the file), {Name:localpath} (the path on the server), {Name:filename}, {Name:image} and {Name:localimage} (an image tag).
A Google Map field has {Name:map}, a map image of the chosen place.
Global placeholders
| Placeholder | Becomes |
|---|---|
{global:formid} |
The form ID. |
{global:submissionid}, {global:submission_id} |
The submission ID. |
{global:date_added} |
The date of the submission. |
{global:userip} |
The visitor's IP address. |
{global:username}, {global:userid}, {global:useremail}, {global:fullname} |
The logged-in user's data. Empty for guests. |
{global:sitename}, {global:siteurl} |
Your site name and address. |
{global:mailfrom}, {global:fromname} |
The sender address and name from the Joomla Global Configuration. |
{global:language} |
The language code of the submission. |
{global:confirmation} |
A link that confirms the submission. See After submission. |
{global:deletion} |
A link that lets the visitor delete the submission. |
Layout placeholders
In the form layout each field has {Name:caption}, {Name:body} (the input itself), {Name:validation} (its error message) and {Name:errorClass}. {error} is the form's error message and {global:formtitle} the form title. See Layout and design.
Conditional blocks
The layout and the thank-you message accept {if} blocks, so a part is shown only when a value matches:
{if {Newsletter:value}}You will get our newsletter.{/if}
Placeholders from plugins
Plugins add their own placeholders, for example {_STATUS:value} for the payment status or {user_pdf} for a PDF link. They are listed on the plugin pages.