Hi,
I have two Check Box.When i check those checkboxes respective panels will display.
Ex:
When i check A check box panel 1 is displayed. When i check B check box panel 2 is displayed. when i check both A & B both panel 1 and panel 2 are displayed.
Now when i uncheck both A & B i should display a message as "Check any one check box to show result"
How can i do this? Please do suggest.
Thank you!
Cheers!
How about in your change handler, set a token with the message if the checkbox token is null, then in each change handler set the message to an empty string
<input type="checkbox" token="unused">
<label>Checkbox $instruction$</label>
<choice value="show_a">Show a</choice>
<choice value="show_b">Show b</choice>
<change>
<condition match=" isnull($unused$)">
<set token="instruction">choose an option</set>
</condition>
<condition value="show_a">
<set token="show_a">1</set>
<set token="instruction"></set>
</condition>
<condition value="show_b">
<set token="show_b">1</set>
<set token="instruction"></set>
</condition>
</change>
</input>
@ITWhisperer It Worked. Thank you!
How about in your change handler, set a token with the message if the checkbox token is null, then in each change handler set the message to an empty string
<input type="checkbox" token="unused">
<label>Checkbox $instruction$</label>
<choice value="show_a">Show a</choice>
<choice value="show_b">Show b</choice>
<change>
<condition match=" isnull($unused$)">
<set token="instruction">choose an option</set>
</condition>
<condition value="show_a">
<set token="show_a">1</set>
<set token="instruction"></set>
</condition>
<condition value="show_b">
<set token="show_b">1</set>
<set token="instruction"></set>
</condition>
</change>
</input>
@ITWhisperer Thanks for the response. I tried above code but when i load the page initially both my check box A and B are checked(which is supposed to be) still i get the label as "choose any option" and panel 1 and 2 are not displayed until i check and uncheck either A or B check box
<input type="checkbox" id="checked_box" token="checkbox">
<label>$noneselected$</label>
<choice value="A">A</choice>
<choice value="B">B</choice>
<change>
<condition match="isnull($checkbox$)">
<set token="noneselected">Select atleast one Checkbox</set>
<unset token="B"></unset>
<unset token="A"></unset>
<unset token="AB"></unset>
</condition>
<condition label="A">
<set token="A">A</set>
<set token="noneselected"></set>
<unset token="B"></unset>
<unset token="AB"></unset>
</condition>
<condition label="B">
<set token="B"></set>
<set token="noneselected"></set>
<unset token="A"></unset>
<unset token="AB"></unset>
</condition>
<condition value="*">
<unset token="B"></unset>
<unset token="A"></unset>
<set token="AB"></set>
<set token="noneselected"></set>
</condition>
</change>
<default>B,A</default>
<initialValue>B,A</initialValue>
<delimiter> </delimiter>
</input>
You should add an init block before your first row
<init>
<set token="noneselected"></set>
<set token="A">A</set>
<set token="B"></set>
</init>