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

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

頭像
捨棄
最佳答案

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.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
3月 15
4495
1
3月 15
4419
1
8月 15
9098
0
6月 15
3344
1
3月 15
7400