Dashboards & Visualizations

How to add a checkbox to panel to hide and unhide panel on dashboard

Mary666
Communicator

Hi Splunk Community,

How can I add a check box to unhide and hide panel? This panel is not dependent of any other panel. Only need to check to hide, check to unhide. My code is below.  Such a simple thing, but can't get it done. Any help is greatly apricated. 

*****MY ATTEMPT ON CREATING THE CHECKBOX INPUT*****
<panel depends="$tok_hide$" >
      <input type="checkbox" token="tok_hide" searchWhenChanged="true">
        <label></label>
        <choice value="TRUE"></choice>
      </input>
  *****BELOW IS THE PANEL I WOULD LIKE TO HIDE AND UNHIDE*****
      <table>
        <title>FileS To Read</title>
        <search>
          <query> Blah blah blah.....  </query>




Labels (2)
Tags (2)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Change depends to rejects - this will hide the whole panel - to unhide it you will also need a way to unset the token.

0 Karma

Mary666
Communicator

@ITWhisperer  Thanks, still having trouble with the check box. I did the panel rejects and unset the token. I can't get the checkbox to function. It does not open the panel and it does not close it. Any suggestions will be greatly appreciated. 

<panel rejects="$tok_update$">
      <input type="checkbox" token="tok_update" searchWhenChanged="true">
        <label>Last Updated</label>
        <prefix>(</prefix>
        <suffix>)</suffix>
        <valuePrefix>update="</valuePrefix>
        <valueSuffix>"</valueSuffix>
        <delimiter>OR</delimiter>
        <fieldForLabel>update</fieldForLabel>
        <fieldForValue>update</fieldForValue>
        <search>
          <query>| blah blah blah blah 
        <unset token="tok_update"></unset>
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

This doesn't look like the checkbox you originally had. 

*****MY ATTEMPT ON CREATING THE CHECKBOX INPUT*****
<panel rejects="$tok_hide$" >
      <input type="checkbox" token="tok_hide" searchWhenChanged="true">
        <label></label>
        <choice value="TRUE"></choice>
      </input>
  *****BELOW IS THE PANEL I WOULD LIKE TO HIDE AND UNHIDE*****
      <table>
        <title>FileS To Read</title>
        <search>
          <query> Blah blah blah.....  </query>
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...