How to implement single selection for checkboxes

Hi there,

I have a checkbox selection implemented as below:


And sharepoint column created as below:


However, I only want to be able to select one selection, so when I select on one of the checkboxes, the other two checkboxes are disabled.

How do I achieve that in JavaScript?


Hello @jyou,

You can change the display choices property to Radio Buttons, thus a user can only select one option.

And no code is required.

hi @mnikitina ,

Unfortunately, the program I am working on doesn't support Radio Buttons. So I am wondering I can write code to limit to one selection only for the checkboxes? Thanks.


You can try out this code:

var options = $(fd.field('MultiChoice').$el).find('input[type="checkbox"]'){
    var selectedOption = $(this).attr("value");
    fd.field('MultiChoice').value = [];

Hi @mnikitina ,

It works for me now. Thanks a bunch :grin: :grin:

1 Like