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

I want to add a custom html attribute (say - download ) to a field in the view

I tried these

<field name="attachment" filename="answer_id" download="answer_id" />

<field name="attachment" filename="answer_id" t-att-download="answer_id" />

but fails. How can achieve this. Thanks in advance

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

Hi,

You can not directly add html attribute in field view.

you need to create widget and then it used in field view.

Thank you.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 15
4496
1
thg 3 15
4427
1
thg 8 15
9101
0
thg 6 15
3346
1
thg 3 15
7402