跳至內容
選單
此問題已被標幟
2 回覆
2584 瀏覽次數

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
5019
0
2月 25
1374
5
11月 23
9169
1
4月 24
6561
4
9月 22
6346