Copy link to clipboard
Copied
Hi there
I have a drop down field with 4 options (A, B, C, D). I have a another set of 3 checkboxes with different export values (X, Y and Z).
If options A, B and C are selected, I want the Checkbox with export value Z to be read only and change color to gray.
Is this possible?
Thanks in advance.
MG
Hi ls
Sorry I should have made myself clearer at the start. I don't usually use Export Value in check boxes unless I want it to work like a radio button. Yes, Nesa's code is perfect if I had different field names.
So how should I tweak the script?
Thanks
MM
Hi MM, I must admit if the checkboxes has same name I'm not sure how to adapt code to that(I'm, sure it's simple) but it's beyond my current level 😉 so if ls_rbls can help you he is more then welcome. In the meantime if you want to use my code above and you want checkboxes to act as radio buttons I have workaround for you, name your checkboxes different (example: X,Y,Z) and use this code as mouse up event of each checkbox just change their names if you want, for checkbox "X" use:
if(event.target
...Copy link to clipboard
Copied
The readonly property is set at the field level, not the widget level, which means you can't set a single "widget" in a group of fields with the same name as read-only, while the others are not.
Copy link to clipboard
Copied
That would be a great feature if it was somehow implemented to work with both checkboxes and radio buttons.
Thank you as usual for your guidance!
Copy link to clipboard
Copied
It's possible to do it by creating fields with unique names and using a script to reset all other members of the "group" when one of them is ticked. It's actually not too complicated to do... And then you could enable/disable some of them without problems.
Copy link to clipboard
Copied
Thanks you everyone for your help on this.
MM