How to make the checkbox read - only using Client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-05-2021 02:50 AM
I have four checkboxes in my Form , whenever the user selects one checkbox the other three should become read - only once the selection is done . It applies to all the four checkboxes , I tried implementing it using UI Policy but as the UI Policies are overridding I am not able to achieve it , how can I achieve it using client script ? Can any one help me with it .
Snippet of the checkboxes on the Form :

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-05-2021 03:00 AM
Hello Pooja
The best and only way to get this working is by using 4 UI policies. Even if you would like to use a script, you still need 4 onChange client scripts for all the boxes.
About the overriding part, this should be your first priority to get these fixed.
A possible use case your are encountering right now:
UI policy A: if checkbox A checked)
-> checkbox A read only = false
-> checkbox B read only true
-> checkbox C read only true
The line I marked in red is might be your issue. Never inverse the logic manually. Let the system handle and leave all other details that you don't need on "Leave alone". This avoids conflicts.
Apart from AL of the above information:
I actually believe that what you got there is not a use case for checkboxes, but rather radio buttons like so:
This allows you to select just 1 option, always unchecking the other.
This variable is called Multiple Choice.
More information on that here:
If any further questions, feel free to ask.
Please mark as helpful or correct if applicable.
Kind regards
Quinten
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-05-2021 03:40 AM
Hi
UI policy A: if checkbox A checked)
-> checkbox A read only = false
the issue which I am facing is when I select 'One' from the checkbox the other three becomes read - only as expected , but when I select 'two' from the checkbox only ( 'three' and 'four') checkbox becomes read only and 'One' checkbox do not become read - only how can I fix this issue ?
The actualy scenario is whenever I select any one checkbox from the above the other three should become read only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-05-2021 04:57 AM
Hello Pooja,
to accomplish this, you can use UI Policies or Client Script
Way 1 : Apply 4 UI Policies according to the conditions.
Way 2 : Apply 4 On Change Client Scripts according to the conditions.
Please mark as helpful or correct if applicable.
Kind regards
Prasad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā05-05-2021 05:11 AM