Macro in form email notification

Khoa Nguyen asked on August 22, 2018 15:43

I want to use macro in form email notification, but didn't work

{%IfEmpty(Phone,"",show label Phone)%}

I want to hide label, in case input is empty. So in email, it should hide label with empty input.

Is there a way we can control this?

http://prntscr.com/kln8o9

Recent Answers


Brenden Kehren answered on August 22, 2018 15:54 (last edited on December 10, 2019 02:31)

I believe the macro method IfEmpty() is only available in transformations. So try something like this:

{%If(Phone != "") { %} $$label:Phone$$ {% } |(identity)GlobalAdministrator%}

1 votesVote for this answer Mark as a Correct answer

Rui Wang answered on August 22, 2018 16:05 (last edited on December 10, 2019 02:31)

I just tested this which works.

<tr>
    <td>{% if (phone != &quot;&quot;) {%}$$label:Phone$${% } |(identity)GlobalAdministrator%}</td>
    <td>$$value:Phone$$</td>
</tr>
1 votesVote for this answer Mark as a Correct answer

Khoa Nguyen answered on August 23, 2018 03:35

both solution working perfectly !!!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.