Skip to main content

Hi all,

I'm trying to find a way to deselect a checbox if another is selected. I need it to do that in runtime while the user is filling in the form, not as a workflow. The checkboxes are all separate Yes/No fields with nested options (only visually).  they can all be selected but I only want 2-3 validations. Possibly avoid a validation rule that shows an error if both are selected. and not to hide/show if another is select. All options need to be shown upfront before they can make their selection.

I know we only got the validation/format rules and I'm not sure how i go about changing a value in runtime. I don't think it is even possible in NF. And I'm not a developer, so I can't tell if it is possible with custom code.

any idea?

You can add JavaScript or JQuery on the form to make this happen. In the form settings you can add script that selects a checkbox when the other is clicked. The 'checkbox1' and 2 is a client ID that is added to the individual control's settings in advanced section. 

NWF$(checkbox1).click(function(){    
NWF$(checkbox2).not(this).prop('checked', this.checked);
});

Reply