跳至内容
菜单
此问题已终结
2 回复
2454 查看

Hello, I am setting up a mail template.


There are some fields in the form that are sometimes empty and when using the placeholder write this:


FIELD_XXX placeholder: $ {object.field_xxx.name}


Email result

FIELD_XXX = False


I want that if the field $ {object.field_xxx.name} is empty the result is, for example EMPTY


Email result

FIELD_XXX = ""


How can I program it?


Thanks guys!

形象
丢弃
最佳答案

Just simply use ${(object.name or '')
Thanks

形象
丢弃
编写者 最佳答案

Thanks for your quick response. I put

FIELD_XXX: ${(object.x_studio_field_xxx.name or "")}

and this worked !!!!! THANK YOU VERY MUCH FOR YOUR ANSWER!!!!!

形象
丢弃
相关帖文 回复 查看 活动
4
9月 23
4710
0
2月 25
1200
5
11月 23
8913
1
4月 24
6377
4
9月 22
6180