Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to set default value in Select dropdown in velocity template file?

Deleted user
March 17, 2022

Hi Team,

I am trying to build a custom build Jira Plugin, on the UI of plugin I am displaying select dropdown which consist of list of Issue Types.

I need to make option value "ALL" as default one for that select dropdown. I have written following code for that.

<div class="field-group">
<label for="issue-types" >Issue Type(s):</label>
<select onchange="disableIfNoIssueTypeSelectedMandate()" class="multi-select" multiple="multiple" id="issue-types-mandate" name="issueTypes[]">
#foreach ($issueType in $allIssueTypesInProject)
<option value="$issueType.get("id")">$issueType.get("name")</option>
#end
</select>
</div>

Can anyone please help me to know how to set default value in this select dropdown?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events