i have a field with 8 checkboxes...the first is "none", second is "HIV",
third is "Cancer", and so on..i would want "none" to be selected if
none of the other 7 are selected; the other 7 can be selected together BUT
NOT with the "none" option. Either* *the *"none" option is by its
self, or the others can be selected together if not one of them. *The
following *constraint *code works for just two options but not more:
WORKING CODE: * not(selected(., 'None') and selected(., 'HIV'))*
CODE NOT WORKING: not(selected(., 'None') and selected(., 'HIV') and
selected(., 'Cancer') and ......)
you have a bug in your code. should be: none and (hiv or cancer or etc)
···
On Thu, Dec 22, 2011 at 02:08, Thapelo Khumomotse wrote:
> hi all,
>
> i have a field with 8 checkboxes...the first is "none", second is "HIV",
> third is "Cancer", and so on..i would want "none" to be selected if none of
> the other 7 are selected; the other 7 can be selected together BUT NOT with
> the "none" option. Either the "none" option is by its self, or the others
> can be selected together if not one of them. The following constraint code
> works for just two options but not more:
>
> WORKING CODE: not(selected(., 'None') and selected(., 'HIV'))
>
> CODE NOT WORKING: not(selected(., 'None') and selected(., 'HIV') and
> selected(., 'Cancer') and ......)
>
> Please help.
>
> Thank you in advance
i have a field with 8 checkboxes...the first is "none", second is "HIV",
third is "Cancer", and so on..i would want "none" to be selected if none
of
the other 7 are selected; the other 7 can be selected together BUT NOT
with
the "none" option. Either the "none" option is by its self, or the others
can be selected together if not one of them. The following constraint
code
works for just two options but not more:
WORKING CODE: not(selected(., 'None') and selected(., 'HIV'))
CODE NOT WORKING: not(selected(., 'None') and selected(., 'HIV') and
selected(., 'Cancer') and ......)