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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Styling a list of checkboxes

A co-worker has created a custom field for a form, it only contains a whole bunch of checkboxes. (they simply created the field. Added the options. That's it)

Now by default it seems that you can give some styling with jQuery by giving each <div> element a style. But that means you can either sort the checkboxes and show them all in one line or display them like a list.

However they want to display these checkboxes as:

x       x
x       x
x       x
x       x

 

Any ideas on how to realise this? It seems difficult as somehow Jira creates these checkboxes all inside their own div element.

Thank you in advance.

2 answers

Hi @Jeffrey de Boer !

Have you managed to complete this task?

You can add JavaScript to the description of the custom field. I believe you want something like this:

<script language="javascript">
AJS.$(document).ready(function(){
  Array.from(document.body.getElementsByClassName("checkbox")).forEach(function (cbox) {
    if (cbox.getAttribute('name')=='customfield_17126') {
      cbox.parentNode.style.cssFloat='right';
      cbox.parentNode.style.width='33%';
    }
  });
});
</script>

Just make sure to replace the number of the custom field ID to whatever your's is.

Suggest an answer

Log in or Sign up to answer
TAGS

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