Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
2571 Lượt xem

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!

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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!!!!!

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
4
thg 9 23
5001
0
thg 2 25
1368
5
thg 11 23
9154
1
thg 4 24
6553
4
thg 9 22
6339