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

Priyanka Khare January 12, 2018

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 votes
Alexey Matveev
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.
January 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
TAGS
AUG Leaders

Atlassian Community Events