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: 10Questions: 4Answers: 0

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 50,258Questions: 1Answers: 7,467 Site admin

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

    Allan

  • misteammisteam Posts: 10Questions: 4Answers: 0

    In editor field sir allan.

  • misteammisteam Posts: 10Questions: 4Answers: 0

    Hi sir @allan, follow up on this. Thanks

  • allanallan Posts: 50,258Questions: 1Answers: 7,467 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: 10Questions: 4Answers: 0

    Thank you Sir @allan, It's working.

Sign In or Register to comment.