Creating a custom Checkbox field with multiple columns with scriptrunner

Orry Wright-Larson May 25, 2022

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