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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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