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!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

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