Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5041 มุมมอง

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.

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 15
4494
1
มี.ค. 15
4411
1
ส.ค. 15
9096
0
มิ.ย. 15
3334
1
มี.ค. 15
7397