Dashboards & Visualizations

can i dynamically change the label in the form ??

rakesh_498115
Motivator

Hi.

I have a created a form with a textbox and dropdown list.In the droplist i have options like A,B,C etc..Basing on the value selected in the dropdown list the label for the textbox should change..ie if i select "A" in dropdown..label for inputbox should change as "Enter value for A" and that value will be entered in the textbox/inputbox to perform the form search..

Please help asap..Thanx..

Tags (2)
0 Karma
1 Solution

sideview
SplunkTrust
SplunkTrust

If this is the core Splunk simplified XML, or core Splunk advanced XML then you cannot do this. Or at least you would have to dive way way in and write custom javascript to patch the core software. And I do not in any way recommend that you try that.

However if you're using Sideview Utils this is relatively easy. In Sideview Utils you can use dollar-tokens, ie "$foo$" as all or part of the label param for the TextField, Pulldown, and Checkbox modules. In fact you can use dollar-tokens pretty much anywhere in the Sideview systems.

So, let's say you had a Sideview Pulldown module offering the user A B or C. And that Pulldown had say "mode" as the value of it's name param. Then below you could have a TextField module, and you would just put:

<param name="label">Enter value for $mode.rawValue$</param>

And that would become "Enter value for A" when the user sees it.

You can read more about Utils here - http://sideviewapps.com/apps/sideview-utils/ Ultimately you'll spend less time being less frustrated, you'll end up with views and dashboards that are much simpler to read and understand, and you'll be able to deliver better dashboards with better functionality to the end users.

Full disclosure: the similarity of my username is not a coincidence.

View solution in original post

sideview
SplunkTrust
SplunkTrust

If this is the core Splunk simplified XML, or core Splunk advanced XML then you cannot do this. Or at least you would have to dive way way in and write custom javascript to patch the core software. And I do not in any way recommend that you try that.

However if you're using Sideview Utils this is relatively easy. In Sideview Utils you can use dollar-tokens, ie "$foo$" as all or part of the label param for the TextField, Pulldown, and Checkbox modules. In fact you can use dollar-tokens pretty much anywhere in the Sideview systems.

So, let's say you had a Sideview Pulldown module offering the user A B or C. And that Pulldown had say "mode" as the value of it's name param. Then below you could have a TextField module, and you would just put:

<param name="label">Enter value for $mode.rawValue$</param>

And that would become "Enter value for A" when the user sees it.

You can read more about Utils here - http://sideviewapps.com/apps/sideview-utils/ Ultimately you'll spend less time being less frustrated, you'll end up with views and dashboards that are much simpler to read and understand, and you'll be able to deliver better dashboards with better functionality to the end users.

Full disclosure: the similarity of my username is not a coincidence.

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Maximizing the Value of Splunk ES 8.x

Splunk Enterprise Security (ES) continues to be a leader in the Gartner Magic Quadrant, reflecting its pivotal ...