Dashboards & Visualizations

How do I set a token from the HTML section of XML dashboard?

matstap
Communicator

I have a simple XML dashboard with an HTML section inside the fieldset section. I want to set a token based on the value of the input field in the HTML section when I press the submit button. How do I do this? Does anyone have an example I could follow?

0 Karma
1 Solution

niketn
Legend

@matstap you would need Simple XML JS Extension to invoke your own Event Handler for <html> input. Then you would need to use SplunkJS Stack to set the token based on value caught in your Event Handler. You should check out one of my previous answers to use html Date Picker input in Splunk Simple XML Dashboard which is based on @jconger 's blog post Using HTML5 Input Type

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

mstjohn_splunk
Splunk Employee
Splunk Employee

Hi @matstap,

Did the answer below solve your problem? If so, please resolve this post by approving it!
If your problem is still not solved, keep us updated so that someone else can help ya. Thanks for posting!

0 Karma

niketn
Legend

@matstap you would need Simple XML JS Extension to invoke your own Event Handler for <html> input. Then you would need to use SplunkJS Stack to set the token based on value caught in your Event Handler. You should check out one of my previous answers to use html Date Picker input in Splunk Simple XML Dashboard which is based on @jconger 's blog post Using HTML5 Input Type

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...