How set select options attribute to readonly from json data ?
How set select options attribute to readonly from json data ?
 magnus@greatlord.com            
            
                Posts: 16Questions: 6Answers: 0
magnus@greatlord.com            
            
                Posts: 16Questions: 6Answers: 0            
            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 forinputelements, so forselectdata 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