How to make empty fields in the Trigger to disappear in the auto-generated email? | XM Community
Solved

How to make empty fields in the Trigger to disappear in the auto-generated email?

  • 10 July 2019
  • 2 replies
  • 19 views

I listed the following fields to be displayed in the auto email response after the completions of the survey.
!

Within the actual survey, the participant enters data only where applicable. Thus, some of the fields will be empty. Below is the auto email response based on the above setup – you will notice that there are many gaps.
!

Is there any way to get the auto email response to look like this instead? I am trying to display only the non-empty data – without those extra spaces.
!
icon

Best answer by TomG 10 July 2019, 20:32

View original

2 replies

Userlevel 7
Badge +27
Append html `<br>` tags to your embedded fields if they aren't empty (2 in the case of Checked fields). You can do this at the of your survey with survey flow branching or in JS. Don't put any line breaks in your email message so your pipes are just one long string:

${e://Field/Us Eq}${e://Field/Expl1}${e://Field/Ck1}${e://Field/DevMkEq} ...etc...
Thanks Tom - it worked!

Leave a Reply