How to hide the time option in the dashboard without using the css but should function in the background ?
@Nadhiya123, can you please add more information for your requirement? Do you want to Hide the Time Picket Input? Do you want to do it with or without CSS? Do you want to toggle between hide and show option? Because, if you want to always hide the Time Picker it is better to use static time in your searches.
Which version of Splunk are you using? Since, from Splunk 6.5 onward all Splunk dashboard inputs can be hidden using Hide Filters
link which is available by default when Form inputs are added to the Dashboard.
If not you can use depends
attribute to hide a Splunk element like Time Picker using a token which is never set in the dashboard. Following is a dummy dashboard for example.
<form>
<label>Hide Time Picker</label>
<fieldset submitButton="false">
</fieldset>
<row>
<panel>
<input depends="$alwaysHideTimePicker$" type="time" token="tokTime">
<label></label>
<default>
<earliest>-24h@h</earliest>
<latest>now</latest>
</default>
</input>
<html>
Earliest : $tokTime.earliest$ Latest: $tokTime.latest$
</html>
</panel>
</row>
</form>
Hi @niketnilay ,
I have tried both ways.
1. .
2. hideFilters='true'
Its working for other input types except time option .Exactly I need to hide the time input in the dashboard. I don't want my users to change the time. Thats my requirement.
@Nadhiya123, can you please add more information for your requirement? Do you want to Hide the Time Picket Input? Do you want to do it with or without CSS? Do you want to toggle between hide and show option? Because, if you want to always hide the Time Picker it is better to use static time in your searches.
Which version of Splunk are you using? Since, from Splunk 6.5 onward all Splunk dashboard inputs can be hidden using Hide Filters
link which is available by default when Form inputs are added to the Dashboard.
If not you can use depends
attribute to hide a Splunk element like Time Picker using a token which is never set in the dashboard. Following is a dummy dashboard for example.
<form>
<label>Hide Time Picker</label>
<fieldset submitButton="false">
</fieldset>
<row>
<panel>
<input depends="$alwaysHideTimePicker$" type="time" token="tokTime">
<label></label>
<default>
<earliest>-24h@h</earliest>
<latest>now</latest>
</default>
</input>
<html>
Earliest : $tokTime.earliest$ Latest: $tokTime.latest$
</html>
</panel>
</row>
</form>
@ niketnilay
Yes it works only on giving the row and panel syntax.
Thank you for your support!
I'm constantly seeing depends="$alwaysHideCSS" and depends="$hiddenForCSS$" .
Can someone please explain this and provide some splunk / css documentation on it?