How set select options attribute to readonly from json data ?
How set select options attribute to readonly from json data ?

Hi
I trying set one or more option field to readonly
I have try follow json struct for a options value
{
"label": "unset",
"value": "-1",
"attr": {
"readonly": "true"
}
},
even
{
"label": "unset",
"value": "-1",
"attr": "readonly": "true"
},
None of them work to set a select option to readonly
accroding https://editor.datatables.net/reference/field/select
the attr should be supported seen version 1.6.2
How to solv this ?
This question has an accepted answers - jump to answer
Answers
readonly
, AFAIK, is forinput
elements, so forselect
data types, you need to usedisabled
, something like this.Hope that helps,
Colin
Thanks I did mix it up
I did change readonly to disabled it work prefect