Hello,
I am trying to show some text depending on the value of a contact property display through a personnalization token.
I tried to use if statement, but it doesn’t work. I do not have the correct content in my email.
I even tried the unless statement, but I had no result either.
To give you some context : When a user complete a form, I retrieve all data from this form. Then I use a worflow to send an email with the data I retrieved.
What I’m trying to do is, when a user do not enter an optionnal field in the form, then in the content’s email has to change depending on these optionnal field.
Here is the code I’m using to test it (when a value = “Select”, it means that the user didn’t fill an optionnal field) :
<table style="background-color: white; padding: 32px 24px;">
<tr>
{% if contact.form__experience_1 == "Select" %}
<td>
{% inline_rich_text field="content_2" value="{{ module.content_2 }}" %}
</td>
{% else if contact.form__experience_2 == "Select" %}
<td>
{% inline_rich_text field="content_3" value="{{ module.content_3 }}" %}
</td>
{% else if contact.form__experience_3 == "Select" %}
<td>
{% inline_rich_text field="content_4" value="{{ module.content_4 }}" %}
</td>
{% else %}
<td>
{% inline_rich_text field="content_1" value="{{ module.content_1 }}" %}
</td>
{% endif %}
</tr>
</table>
I hope we can find a solution for this issue.
Don’t hesitate to tell me if you need more information.
Thank you,
Antoine