Disabling a value in multiple check box form control

Raga Mounika
Posts: 49

Disabling a value in multiple check box form control

Wed Apr 12, 2017 10:30 am

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
alex_jitianu
Posts: 649

Re: Disabling a value in multiple check box form control

Thu Apr 13, 2017 4:23 pm

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

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: No registered users and 0 guests