<?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: Hiding default value in text input. in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Hiding-default-value-in-text-input/m-p/127356#M7541</link>
    <description>&lt;P&gt;It is not working. Could you please suggest some other way?&lt;/P&gt;</description>
    <pubDate>Wed, 27 May 2015 05:40:53 GMT</pubDate>
    <dc:creator>AditiKulkarni</dc:creator>
    <dc:date>2015-05-27T05:40:53Z</dc:date>
    <item>
      <title>Hiding default value in text input.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Hiding-default-value-in-text-input/m-p/127354#M7539</link>
      <description>&lt;P&gt;I want to develope a dashboard which has a search criteria having multiple text inputs. The default value for text input is "All" i.e. %. The code for same is as below : &lt;/P&gt;

&lt;P&gt;&amp;lt;input type="text" token="var_tkn" searchWhenChanged="false"&amp;gt;&lt;BR /&gt;
      &lt;LABEL&gt;Variable name&lt;/LABEL&gt;&lt;BR /&gt;
      &lt;DEFAULT&gt;%&lt;/DEFAULT&gt;&lt;BR /&gt;
    &lt;/P&gt;

&lt;P&gt;But when i run this code, "%" value is shown in the text box. I don't want to show the "%" value in text box but want to show "blank" or "All" in the text box. How can i achieve this? How can i hide % in the textbox?&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2015 12:17:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Hiding-default-value-in-text-input/m-p/127354#M7539</guid>
      <dc:creator>AditiKulkarni</dc:creator>
      <dc:date>2015-05-26T12:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding default value in text input.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Hiding-default-value-in-text-input/m-p/127355#M7540</link>
      <description>&lt;P&gt;One way is to put the desired string in your input statement and then change it at search time.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="text" token="var_tkn" searchWhenChanged="false"&amp;gt;
Variable name
All 
&amp;lt;/input&amp;gt;
...
&amp;lt;searchString&amp;gt;index = foo | eval Variable name=if(Variable name="All","%",Variable name) | ... &amp;lt;/searchString&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 May 2015 12:42:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Hiding-default-value-in-text-input/m-p/127355#M7540</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2015-05-26T12:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding default value in text input.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Hiding-default-value-in-text-input/m-p/127356#M7541</link>
      <description>&lt;P&gt;It is not working. Could you please suggest some other way?&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2015 05:40:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Hiding-default-value-in-text-input/m-p/127356#M7541</guid>
      <dc:creator>AditiKulkarni</dc:creator>
      <dc:date>2015-05-27T05:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding default value in text input.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Hiding-default-value-in-text-input/m-p/127357#M7542</link>
      <description>&lt;P&gt;Try Below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input&amp;gt;
....
&amp;lt;fieldForLabel&amp;gt;All&amp;lt;/fieldForLabel&amp;gt;
&amp;lt;fieldForValue&amp;gt;%&amp;lt;/fieldForValue&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 08 Oct 2017 13:39:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Hiding-default-value-in-text-input/m-p/127357#M7542</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2017-10-08T13:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding default value in text input.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Hiding-default-value-in-text-input/m-p/127358#M7543</link>
      <description>&lt;P&gt;@AditiKulkarni, please try the following run anywhere dashboard example.&lt;/P&gt;

&lt;P&gt;Default value for the text box input &lt;CODE&gt;txtName&lt;/CODE&gt; is &lt;CODE&gt;All&lt;/CODE&gt;, however, the &lt;CODE&gt;&amp;lt;change&amp;gt;&lt;/CODE&gt;Event Handler of text box is used to pass on the value of token&lt;CODE&gt;var_tkn&lt;/CODE&gt; as &lt;CODE&gt;%&lt;/CODE&gt; whenever the selected value in textbox is &lt;CODE&gt;All&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Change TextBox Default Value&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="text" token="txtName" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Variable Name&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;All&amp;lt;/default&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition value="All"&amp;gt;
          &amp;lt;set token="var_tkn"&amp;gt;%&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
        &amp;lt;condition&amp;gt;
          &amp;lt;set token="var_tkn"&amp;gt;$value$&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&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
| eval var_tkn="$var_tkn$" 
| table var_tkn
          &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, 08 Oct 2017 17:59:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Hiding-default-value-in-text-input/m-p/127358#M7543</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-10-08T17:59:40Z</dc:date>
    </item>
  </channel>
</rss>

