Dashboards & Visualizations

Search Manager Javascript

Mubarish
Path Finder

When I convert my simple XML files with form inputs to HTML Dashboard
Suppose I am having a text input in my simple xml while converting to HTML Dashboard, Javascript with following code is generated in my HTML Dashboard.
var field2 = new TextInput({
"id": "field2",
"value": "$form.Direction$",
"default":"*",
"el": $('#field2')
}, {tokens: true}).render();
In the above code, I need a description on the following statement ( like what is the purpose of the statement)
"el": $('#field2')

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

$('#field2') is JQuery for "grab the HTML element with id='field2'", and whatever is returned is passed into the TextInput' constructor as the el property, short for "element".

In other words, that tells the TextInput to render itself within the HTML element with id="field2".

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...