Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
8378 Näkymät

can we customize the type attribute of field using JS? 

<input type="range"

will have to extend AbstractField or anything else?

Avatar
Hylkää
Tekijä Paras vastaus

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
});
Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
maalisk. 15
4346
1
kesäk. 23
3657
1
toukok. 23
2204
0
toukok. 24
2170
1
tammik. 19
5351