Using macros with BizForms

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

Values of the fields that you need to fill in when configuring a BizForm can be obtained dynamically from the submitted forms. The following table shows which macro types can be used for particular values of BizForm configuration.








Fields tab - Default value attribute

Notification e-mail and Autoresponder tabs - all fields


General tab - Form display name, Display text , Submit button text; Fields tab - Field caption; Form tab - Table layout






General tab - Redirect to URL







Context (data) macros


You can use values from current context when configuring a BizForm. This can be achieved using a data macro in the {%column_name%} format. The column_name part of the macro is the value of the Column name property of a particular BizForm filed. When the form is submitted, the macros are automatically resolved and replaced with particular data from the form.


These macros can be used in the following fields:


General tab
Display text
Redirect to URL
Notification e-mails
From e-mail
To e-mail
E-mail body
Autoresponder e-mails
From e-mail
E-mail body


Example 1


When configuring notification e-mails for the sample BizForm created in the Creating a new form topic, you may use the following values:


From e-mail: {%Email%};
Subject: Event registration by {%FirstName%} {%LastName%};


This will result in the e-mail having the user's e-mail address as the sender address, which enables the recipient to easily reply to the e-mail. The subject of the e-mail will have the first and last name of the user, which will help identifying the sender of the e-mail.


Example 2


If you entered the Display text value on the General tab of the same form like this:


Dear {%FirstName%}, thank you for your message. We will contact you shortly.


The text will be resolved as the following when "Jane" was entered in the First name field by the user:


Dear Jane, thank you for your message. We will contact you shortly.


Form text localization


If you need to display the form on a multi-lingual website, you can localize field captions and other text strings using localization macros, e.g.:




You can find more details in Development -> Multilingual and international support -> Localization expressions.

Detailed overview of all macros in Kentico CMS can be found in Appendix A - Macro expressions.


Page url: