It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Custom fields based on a select list

Hi all.

I want to show a custom field when they select a choice in a select list.

For example: A select list with YES or NO, if you select YES show a custom field to explain why you choose yes

How can I do it?

Thanks!

2 answers

1 accepted

1 vote
Answer accepted
Leo Community Leader Sep 23, 2019

Hi @Ian Van Xanten,

 

I'm not sure about hide/display fields but you can enable/disable custom fields based on another field selection using simple javascript something like below. 

below script will enable/disable one of the custom field based on the priority value selection

NOTE: you must place this script in the custom field's(Field B) description

 

<script type="text/javascript">
  priority = document.getElementById('priority');
  if (priority) {
      target = document.getElementById('customfield_10000');
      // Hide the target field if priority isn't critical
      if (priority.value != 2) target.style.display='none';
 
      priority.onchange=function() {
          if (this.value == 2) {              
                     target.style.display = '';  
                     target.value="enter message here";
                  } else {
                 target.style.display='none';
          }
      }
  }
 </script>

 

BR,

Leo

Thanks @Leo 

0 votes

Hi @Ian Van Xanten ,

 

With help of Dynamic Forms for Jira  app you will create dynamic fields and helps to display Display only context-relevant fields to users.

Thanks,

Avinash

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

245 views 1 2
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you