How to disable select in custom field in .vm file

Hello,

I am adding the option to disable a customfield that was developped internally.

I am trying to append the “disabled” property in my .vm file to a “select” but it doesn’t seem to work.

My initial workaround was to add CSS to the select using javascript but I was wondering if there was a better alternative?

Here’s the relevant part for reference

<select class="aui-field-issuepicker hidden" multiple="multiple" id="$customField.id" name="$customField.id:selectedIssuesList"
        data-remove-on-un-select="true"
        data-ajax-options.query="true"
        data-ajax-options.url="...redacted..."
        data-ajax-options.data.current-issue-key="$!issue.key"
        data-ajax-options.data.show-sub-tasks="false"
        data-ajax-options.data.show-sub-task-parent="false"
        data-ajax-options.data.current-project-id="">
    #foreach ($issueKey in $selectedIssuesList)
        <option value="$issueKey" SELECTED>$issueKey</option>
    #end
</select>```

Thanks

Hi @Radwan1

I tried and if you only put “disabled” it’s work for me but if you put disabled=“disabled” it doesn’t work.

<select class="aui-field-issuepicker" multiple="multiple" id="$customField.id" name="$customField.id:selectedIssuesList" . . . disabled>

Fabien