function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
adamproadampro 

Uncheck an inputCheckbox when another is selected

Hi,

 

I'm designing a survey page where every question has two possible answers, and the user is only allowed to select one. I want to make it so that when a box is set true, it will turn the other one false to ensure only one box for that question is checked. Can anyone think of a good way of doing this?

 

Is there a way to call a method after the box has been set true? I know you can re-render page blocks but I don't think that helps here.

 

 

Thanks!

Best Answer chosen by Admin (Salesforce Developers) 
adamproadampro

Nevermind, I found you can get this functionality from a selectRadio tag instead of inputCheckbox.