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

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

Is there any provision or method to check only one checkbox at a time using Javascript?

Hi,

I want to check only one checkbox at a time out of the two, can someone help me how to implement this in javascript in field description. Currently I am using Jira 8.13.4 jira dc edition. 

<script>
$(document).ready(function(){
$('input:#customfield_13266-1,#customfield_13266-2').click(function() {
$('input:#customfield_13266-1,#customfield_13266-2').not(this).prop('checked', false);
});
});
</script>

The script above worked before but after the upgrade to jira 8.13.4 its not working.



1 answer

0 votes
Brant Schroeder Community Leader Jul 21, 2021

@Mohammed Siyad 

Are you trying to prevent multiple checkboxes from being selected.  If that is the case why not just use the radio button custom field?

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