Page 1 of 1

Disabling a value in multiple check box form control

Posted: Wed Apr 12, 2017 10:30 am
by Raga Mounika
Hi Team,

I am using Oxygen Author 18 plugin in eclipse domain. I am having 3 values a,b,c as a multiple value checkbox for an element 'x'. As per my requirement when 'a' is selected 'b' value should be disabled automatically( user should not select 'a' and 'b' both at a time) . Is it possible to disable a particular value in multiple checkbox. If so please help me with the proper code.

Code: Select all

*[class~="topic/x"]:before(5) {
content: oxy_combobox(
edit, "@outputclass",
editable, false,
values, ",a,b,c",
columns, 9,
fontInherit,true);

}
Regards,
Mounika

Re: Disabling a value in multiple check box form control

Posted: Thu Apr 13, 2017 4:23 pm
by alex_jitianu
Hi,

I see that the sample code uses a combo box form control (oxy_combobox()). I assume you meant to use oxy_checkbox(), right?
Should these check boxes be mutually exclusive? Selecting one should uncheck all others? If the answer is yes then you can do it like this:

Code: Select all


*[class~="topic/x"]:before(5) {
content:
oxy_checkbox(edit, '@outputclass', values, 'a', labels, 'Male')
" "
oxy_checkbox(edit, '@outputclass', values, 'b', labels, 'Female');
" "
oxy_checkbox(edit, '@outputclass', values, 'c', labels, 'Female');
}
If the user should be permitted to select different combinations (like selecting 'a' and 'c') then I'm afraid the default check box form control can't be used. You can implement a custom form control. If you want to go on this path please let me know and I will send you the source code for the built-in check box form control. It should take to much work to enhance it.


Best regards,
Alex