How to disabled some value in select/options? Please see attached pic.

How to disabled some value in select/options? Please see attached pic.

misteammisteam Posts: 48Questions: 17Answers: 0

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin

    Where is that select list. Is it in an Editor field or some other external component?

    Allan

  • misteammisteam Posts: 48Questions: 17Answers: 0

    In editor field sir allan.

  • misteammisteam Posts: 48Questions: 17Answers: 0

    Hi sir @allan, follow up on this. Thanks

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Answer ✓

    You would need to use something like:

    editor.field('mySelect').input().find('option[value="Saab"]').attr('disabled', true);
    

    i.e. use field().input() to get the select element, then a little selector to get the option you want to disable and add a suitable attribute to it.

    Allan

  • misteammisteam Posts: 48Questions: 17Answers: 0

    Thank you Sir @allan, It's working.

This discussion has been closed.