I have [...] an item "Access" which is a checkbox with 3 options.On select of "A", both "B" and "O" should become ReadOnly. On unchecking "A" both "B" and "O" should come back
Why not have a radio button instead?
I am assuming that that is the reason Abishk is using a checkbox because the user needs may need to select both "Branch" and "Online".
You are absolutely right taalgaard, the flexibility given to the user for choosing both "branch" and "Online" is my reason of going ahead with checkbox and not radio button. And your example matches absolutely with my requirement. thanks taalgaard.and thanks everyone.
Hi Everyone,-->I have a DCT with a container "Main" and an item called "Access" which is a checkbox with 3 options named "A", "Branch" and "Online".-->My requirement is On select of "A", both "Branch" and "Online" should become ReadOnly.And on unchecking "A" both "Branch" and "Online" should come back to not ReadOnly state.-->i have referred TeamSite FormAPI Reference Guide and i am using the OnItemChange event:-IWEventRegistry.addItemHandle("/Main/Access","OnItemChange",checkBox);-->I have got the name of the option by using:- newOptions=IWDatacapture.getItem("/Main/Access").getOptions();alert(newOptions[1].item);-->I have even got the value of the selected checkbox by:-var val = obj.getValue();obj.setReadonly(true);//Sets all checkboxes as readonly-->But i dont know how to get only "Branch" and "Online" checkboxes to become readonly and not the "A"..I'll be really thankful if anyone can help...
He wants to have the user unselect the first option which then allows them to be able to select the 2nd and 3rd. If they ever select the 1st, then the other two options should unselect and be unselectable (or in the case of my code disappear). He could change it up if desires and make the 2nd and 3rd option stick around. However, making them stick around and not be selectable is confusing to the user unless he can make them grayed out (which he can't) Making the 2nd and 3rd option disappear is not quite as confusing to the user in this case.Heck, maybe there's a better solution, but if it works for him, then go for it.
Heck, maybe there's a better solution, but if it works for him, then go for it.