I have few checkboxes where my panels are getting displayed when i select them and if i unselct them they are not appearing , till hear i am good but my requirement is
under mainframe i have 2 checkboxes source and destination
under services i have 6 checkboxes service1, service2......
under items i have 4 checkboxes item1, item2....
So here ,
service1, service2 and service 3, item1, item 2 belongs to source
service4, service5 and service 6, item3, item 4 belongs to destination
So my panels should display when i select source, service1, item1 check box only.
Main frame services items
source service1 item1
destination service2 item2
service3 item3
service4 item4
service5
service6
How can i do that?????
You need two elements:
See Show or hide content. Actual coding takes some practice. There are many examples in this forum, too.
so here is my code, can u help me on this:
<form>
<label></label>
<fieldset submitbutton="false">
<input type="checkbox" token="check" searchwhenchanged=true>
<label>source details</label>
<choice value=sourcetype=afv OR sourcetype=afv ght OR sourcetype=afv jhy> source</choice>
<choice value=sourcetype=aaa OR sourcetype=aaabgth OR sourcetype=aaajuk> destination</choice>
<change>
<condition match =$check$ == *afv*>
<set token=src>1</set>
<unset token=dst></unset>
</condition>
<condition match =$check$ == *aaa*>
<set token=dst>1</set>
<unset token=src></unset>
</condition>
<condition match =$check$ == *afv*>
<set token=src>1</set>
<set token=dst>1</set>
</condition>
</change>
<row>
<panel depends="$src$">
<title></tilte>
<search>
<query>.....</query>
</form>
Just make sure you open and close XML tags properly, and note that some special characters must be represented as HTML entities; e.g., quotation mark (") must be represented as ".
This is a test dashboard based on your code to play with.
<form version="1.1">
<label>test hiding</label>
<description></description>
<search>
<query>.....</query>
</search>
<fieldset>
<input type="checkbox" token="check" searchWhenChanged="true">
<label>check</label>
<choice value="sourcetype="afv" OR sourcetype="afv ght" OR sourcetype="afv jhy"">source</choice>
<choice value="sourcetype="aaa" OR sourcetype="aaabgth" OR sourcetype="aaajuk"">destination</choice>
<change>
<condition match="match($check$, "afv")">
<set token="src">1</set>
<unset token="dst"></unset>
</condition>
<condition match="match($check$, "aaa")">
<set token="dst">1</set>
<unset token="src"></unset>
</condition>
<condition match="$check$ == "*afv*"">
<set token="src">1</set>
<set token="dst">1</set>
</condition>
</change>
<delimiter> </delimiter>
</input>
</fieldset>
<row>
<panel depends="$src$">
<html>
<p>test</p>
<br>check: $check$</br>
</html>
</panel>
</row>
</form>