Conditional Content Blocks
Conditional Content Blcoks enables you to change email and PDF content based on form data. So you can have 1 email but have the content change dynamically based on what the user selected in the form.
How does it work?
Lets create a scenario where we will have 2 types of content displayed when a user select A or B from our field called “Product”.
The shortcode is constructed as follows:
[nfccb field=”field_name” value=”conditional_value”]Content displayed if the field’s value is equal to the value specified[/nfccb]
So let say we want to display some content but only if a user select A from the Product field. We will add this in our email body or PDF content body:
[nfccb field=”product” value=”A”]You have chosen product A and here are some info relevant to product A etc etc[/nfccb]
So let say we want to display some content but only if a user select B from the Product field. We will add this in our email body or PDF content body:
[nfccb field=”product” value=”B”]You have chosen product B and here are some info relevant to product B etc etc[/nfccb]
So in your content you will have both these blocks in the same location in your HTML or plain text body, so basically the the content in this area gets replaced according to the selection.
[nfccb field=”product” value=”A”]You have chosen product A and here are some info relevant to product A etc etc[/nfccb]
[nfccb field=”product” value=”B”]You have chosen product B and here are some info relevant to product B etc etc[/nfccb]
If A is selected only the content displayed in the shortcode specifying value A will be displayed and not B…and visa versa
See below on using other expressions:
{not} = Not Equal to
{gt} = Greater than
{gte} = Greater than or Equal
{lt} = Less than
{lte} = Less than or Equal
{contain} = Contains the value
{not contain} = Does not contain the value
For example: a less than or equal to block will look like this:
[nfccb field=”your_field” value=”{lte}your_value”]You have chosen product B and here are some info relevant to product B etc etc[/nfccb]
This can also be done for Email Recipients, Email Subjects, From Address, From Name and redirects after submit.