If i have take drop down field - "type of content" where i have given 4 options as dropdown (please

If i have take drop down field - "type of content" where i have given 4 options as dropdown (please refer to the image attached). In this, i also have an option as 'others'. If i chose others i should get an option to write my own text . How can this be achieved ? Please reply with a solution- 

 

In the below script i have take test field(with drop down with 'others' as an option), if i click on others i should get a test field to fill in my requirement. The below code does not work for me

<script type="text/javascript">
priority = document.getElementById('Test field');
if (Test field) {
target = document.getElementById('customfield_26823');
// Hide the target field if priority isn't critical
if (Test field.value!= others) target.style.display='none';

priority.onchange=function() {
if (this.value == 2) {
target.style.display = '';
target.value="enter your message here";
} else {
target.style.display='none';
}
}
}
</script>

1 answer

0 vote
Alexey Matveev Community Champion Jan 12, 2018

Hello,

You could use such plugins as Adaptivist ScriptRunner(behaviours) or Power Scripts(Live fields) instead of writing your own JavaScript

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

70 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you