Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a custom Checkbox field with multiple columns with scriptrunner

Orry Wright-Larson May 25, 2022 edited

I have found this script floating around on mulitple to solve the issue of creating multiple columns for a custom checkbox field. I have run it in the description and it does not appear to anything and when I run it in the script runner console it shows errors in the code. Has the way the code needs to be written changed?

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

1 answer

1 accepted

1 vote
Answer accepted
Orry Wright-Larson May 26, 2022

Figure out my answer. 

 

Enable HTML in descriptions was turned off under System

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, likes for trees, atlassian community, social impact, tree planting campaign, community kudos, atlassian giving, environmental impact, sustainability, likes for good, atlassian social responsibility, community challenge

Make every click count—help us plant 50,000 trees! 🌳

Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!

Help us plant more trees
AUG Leaders

Atlassian Community Events