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 Join to answer
Community showcase
Emilee Spencer
Published yesterday in Marketplace Apps

Marketplace Spotlight: DeepAffects

Hello Atlassian Community! My name is Emilee, and I’m a Product Marketing Manager for the Marketplace team. Starting with this post, I'm kicking off a monthly series of Spotlights to highlight Ma...

37 views 0 3
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot