Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to Remove "None" from select list options.

atul April 24, 2012

Hi There,

Can you suggest me the way to remove "none" option from select list ?

4 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
atul May 14, 2012

I achieved this by using javascript.

Raju KC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 24, 2013

Can you share your javascript?

atul April 24, 2013

AJS.$(document).ready(function(){
AJS.$("input[name=customfield_10768]").blur(function () { <!--"customfield_10768" Field that is placed before the Select Box field, who will triggered the codition.-->
var objoptions = document.getElementsByName("customfield_11170")[0].options; <!--"customfield_11170" Select Field-->
if (objoptions[0].text == "None")
{
document.getElementsByName("customfield_11170")[0].remove(0);
}
});
});

Cheers!!!

Ramiro Pointis
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 9, 2013

Where do you put this javascript?

Raju KC
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 9, 2013

In the description of the custom field.

0 votes
Honey Raj May 4, 2016

You have to make the field required, then the 'none' won't be there anymore.

0 votes
Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2012

If you don't want to modify the code making the field required will remove None

Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2012

that's true, this doesn't work, as you can read in the feature request, I've mentioned yet: https://jira.atlassian.com/browse/JRA-7687

atul April 24, 2012

I tried but its not removing None from select List.

atul April 25, 2012

Hey Guys,

I achieved this by using javascript.

By the way thank you for your suggestions.

Ragards,

Atul

0 votes
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2012
Thomas Schlegel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 24, 2012

as it is mentioned in the page, it is a workaround. You can vote for the feature request here: https://jira.atlassian.com/browse/JRA-7687

atul April 24, 2012

What if i don't want to change global settings, As it would impact for all other project.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events