<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Access token value from a textbox in html dashboard in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Access-token-value-from-a-textbox-in-html-dashboard/m-p/378490#M42026</link>
    <description>&lt;P&gt;Try without the quotes... &lt;CODE&gt;"value": $appname_tok$&lt;/CODE&gt; are the results the same ?  Also try to see what's in the token, make an html panel and display it to make sure it's populating properly. &lt;/P&gt;</description>
    <pubDate>Sun, 19 May 2019 12:16:59 GMT</pubDate>
    <dc:creator>DavidHourani</dc:creator>
    <dc:date>2019-05-19T12:16:59Z</dc:date>
    <item>
      <title>Access token value from a textbox in html dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Access-token-value-from-a-textbox-in-html-dashboard/m-p/378489#M42025</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am trying to access the value of a text input box in an html dashboard to pass to the saved search being called when submit button is pressed.&lt;BR /&gt;
I am unable to get the value so far. Can someone pls tell me what I am missing?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Komal&lt;/P&gt;

&lt;HR /&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;div id="panel2" class="dashboard-cell" style="width: 100%;"&amp;gt;
        &amp;lt;div class="dashboard-panel clearfix"&amp;gt;
            &amp;lt;div class="fieldset"&amp;gt;
                &amp;lt;div class="input input-text" id="text1"&amp;gt;
        &amp;lt;label&amp;gt; &amp;lt;/label&amp;gt;
    &amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;….&lt;/P&gt;

&lt;H2&gt;Form Inputs section of the dashbaord&lt;/H2&gt;

&lt;P&gt;//&lt;BR /&gt;
        // VIEWS: FORM INPUTS&lt;BR /&gt;
        //&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    var text1 = new TextInput({
        "id": "text1",
        "searchWhenChanged": true,
        "value": "$appname_tok$",
        "el": $('#text1')
    }, {tokens: true}).render();
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;In my saved search I am saying ….$appname_tok$ but it does not pick up the value entered.&lt;BR /&gt;
I have referenced this document already.&lt;BR /&gt;
&lt;A href="http://dev.splunk.com/view/webframework-codeexamples/SP-CAAAE5V"&gt;http://dev.splunk.com/view/webframework-codeexamples/SP-CAAAE5V&lt;/A&gt;&lt;BR /&gt;
Any pointers?&lt;/P&gt;

&lt;P&gt;Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Sun, 19 May 2019 03:44:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Access-token-value-from-a-textbox-in-html-dashboard/m-p/378489#M42025</guid>
      <dc:creator>komalg</dc:creator>
      <dc:date>2019-05-19T03:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Access token value from a textbox in html dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Access-token-value-from-a-textbox-in-html-dashboard/m-p/378490#M42026</link>
      <description>&lt;P&gt;Try without the quotes... &lt;CODE&gt;"value": $appname_tok$&lt;/CODE&gt; are the results the same ?  Also try to see what's in the token, make an html panel and display it to make sure it's populating properly. &lt;/P&gt;</description>
      <pubDate>Sun, 19 May 2019 12:16:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Access-token-value-from-a-textbox-in-html-dashboard/m-p/378490#M42026</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-19T12:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Access token value from a textbox in html dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Access-token-value-from-a-textbox-in-html-dashboard/m-p/378491#M42027</link>
      <description>&lt;P&gt;@komalg any reason for converting dashboard to html? If you want to pass &lt;STRONG&gt;selected textbox input value to your search on click of submit button&lt;/STRONG&gt; this can be done directly using Simple XML Dashboard. So kindly explain the need for html dashboard. Following is a run anywhere example.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Text Box to Saved Search&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="true"&amp;gt;
    &amp;lt;input type="text" token="appname_tok"&amp;gt;
      &amp;lt;label&amp;gt;text1&amp;lt;/label&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;
            | makeresults
            | fields - _time
            | eval SelectedText="$appname_tok$"
          &amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 19 May 2019 17:41:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Access-token-value-from-a-textbox-in-html-dashboard/m-p/378491#M42027</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-05-19T17:41:41Z</dc:date>
    </item>
  </channel>
</rss>

