Dear,
In the setting of the choice control add a custom css class to the "CSS class" setting (See attached image-Named here "CheckBoxCSS").
Then add the below client side code to the "Custom JavaScript" section in the form settings:
NWF$(document).ready(function () {
NWF$(".CheckBoxCSS").find("input").change(function () {
if (NWF$(this).prop("checked")) {
NWF$(".CheckBoxCSS").find("input").not(this).prop("checked", false).trigger("change");
}
});
});
Cheers ...
if you changed sharepoint list field settings to 'radio buttons' it would render as radio switch with just single option selected and you wouldn't need any javascript.
Dear .
If the choice control is already connected to checbox(multi-selection) column, the change in the settings is not possible unless changing the settings of the column itself in SharePoint list/library.
fully agree.
therefore I've written:
if you changed sharepoint list field settings to 'radio buttons'
I do agree with the radio button approach, generally speaking radio buttons signal a single choice among many options, whereas checkbox usually indicates multiple among multiple options.
Dear Mike Matsako,
May you want to keep the look and feel as a checkbox and the functionality as radio buttons.
It sounds like that is what the user wants and there is nothing wrong with that, but from a general forms standpoint, radios are singular, and checkboxes indicate multiple selection in most systems. I do believe you have solved his request though.
I fully agree. Not only that I won't need to have any javascript, but I would also obey an internet standard (and to be honest there aren't that much standards which someone can really rely to within the internet).
BUT customers wants it, customer is willing to pay for it, customer has no flexibility at all to change his mindset here (it's a German public authority).
I am really not happy to do so, but at the end "the customer is always right".
Dear Philip,
Exactley what I needed - wicked!
Thanks a lot!
Cheers mai-kel
glad you have a solution. Please use the "mark correct" button to close out this thread.
I know exactly how that is! Customer is king. Glad the solution worked for you.
Hi, the solution you posted works great for "one check box object" on a form page. I am wondering how to adjust the script to treat "each check box object" independently from the other Check Box Objects on the same form (document). For example, I have the following in a NINTEX Panel and only want the initial user to select one box from each input item: