Jump to content
  • 0

Can I remove blank fields on my notification email?


HowDoYouWannaDoThis
 Share

Question

2 answers to this question

Recommended Posts

  • 1

You can create a virtual field on your submission form and use a bit of script just like below:

COALESCE('Item1: '+NULLIF('[@field:item1]','')+'<br/>', '')+
COALESCE('Item2: '+NULLIF('[@field:item2]','')+'<br/>', '')+
COALESCE('Item3: '+NULLIF('[@field:item3]','')+'<br/>', '')+
COALESCE('Item4: '+NULLIF('[@field:item4]','')+'<br/>', '')+
COALESCE('Item5: '+NULLIF('[@field:item5]',''),'')

This will remove all fields that doesn't contain any values. Once that is done, go to your email notification at the end of the DataPage configuration and put the Virtualfield in body. Don't forget to set it to HTML for the '<br/>' to work. This setting will show 1 field or item per line. If you want to show every item in one line then change <br/> to space or comma.

image.png.13ef231b55170415098012675ad69b79.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...