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

can we customize the type attribute of field using JS? 

<input type="range"

will have to extend AbstractField or anything else?

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

for that, I have to extend and override InputField's _prepareInput method and set type as range

file: basic_fields.js

method : _prepareInput

we can add all HTML tag attributes like this

this.$input.attr({
     type: range, 
     // other attributes
});
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
มี.ค. 15
4347
1
มิ.ย. 23
3669
Javascript Widget: appendTo not working แก้ไขแล้ว
1
พ.ค. 23
2209
0
พ.ค. 24
2172
1
ม.ค. 19
5354