<?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: dashboard clear text in text input in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419877#M27659</link>
    <description>&lt;P&gt;Hi , Any answers? clues...alternatives&lt;/P&gt;</description>
    <pubDate>Sun, 03 Mar 2019 13:01:05 GMT</pubDate>
    <dc:creator>Sukisen1981</dc:creator>
    <dc:date>2019-03-03T13:01:05Z</dc:date>
    <item>
      <title>dashboard clear text in text input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419876#M27658</link>
      <description>&lt;P&gt;Is there a way in simple xml form to have the X symbol enabled inside the input text box?&lt;BR /&gt;
The input drop down has the child element showclearbutton, but the same does not exist for text inputs.&lt;BR /&gt;
I have seen some complex answers involving js etc, but is it really that complex?&lt;BR /&gt;
Can we do something with CSS inside the simple xml form?&lt;BR /&gt;
Basically, i have text input box and I would like the users to be able to click on the X icon/symbol inside the text input box and clear all text&lt;BR /&gt;
Splunk Version 6.6.3&lt;/P&gt;</description>
      <pubDate>Sat, 02 Mar 2019 09:20:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419876#M27658</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-03-02T09:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: dashboard clear text in text input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419877#M27659</link>
      <description>&lt;P&gt;Hi , Any answers? clues...alternatives&lt;/P&gt;</description>
      <pubDate>Sun, 03 Mar 2019 13:01:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419877#M27659</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-03-03T13:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: dashboard clear text in text input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419878#M27660</link>
      <description>&lt;P&gt;i think this is a bit more complicated than you might imagine?  You're essentially trying to add a button to an existing text box and have that button take some action.  And you want to do it with just a styling engine?  Probably not doable.  &lt;/P&gt;

&lt;P&gt;Adding html elements and placing them in existing divs from simple xml is impossible i think.  But even if you could, no idea how you would also use css to take action when that button is clicked?  Without js?  I know css can be pretty powerful, but it does have its limits, right?&lt;/P&gt;

&lt;P&gt;That said, you can sort of mimic that functionality with simple xml.  And maybe with this approach, you &lt;EM&gt;could&lt;/EM&gt; use css to further style these elements...adding to the illusion that it is "built-in"?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Playing Around&amp;lt;/label&amp;gt;

  &amp;lt;fieldset submitButton="false" autoRun="false"&amp;gt;
    &amp;lt;input type="text" token="my_text"&amp;gt;
      &amp;lt;label&amp;gt;Enter Some Text&amp;lt;/label&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;input type="checkbox" token="clear_button" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;unset token="form.clear_button"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;unset token="form.my_text"&amp;gt;&amp;lt;/unset&amp;gt;
      &amp;lt;/change&amp;gt;
      &amp;lt;delimiter&amp;gt; &amp;lt;/delimiter&amp;gt;
      &amp;lt;choice value="clear"&amp;gt;X&amp;lt;/choice&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 03 Mar 2019 15:00:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419878#M27660</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2019-03-03T15:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: dashboard clear text in text input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419879#M27661</link>
      <description>&lt;P&gt;Hi @maciep , thanks for the response.&lt;BR /&gt;
I had tried this option before, and well I am sorry I had forgotten to mention, I do have another drop down input and a submit button as well. The submit button will take inputs from the drop down and text input fields. and then do its search. There will be a big gap between the text input (which has to be the second input type in the form) and the submit button, which affects the look and feel of the dashboard. I did try replacing X with some larger text like 'clear entered text' but it does not help much.&lt;BR /&gt;
What I did try was to convert the simple XML to HTML and with the help of a few HTML divs, and CSS inside the HTML form I was able to achieve the needed behaviour. Basically just have a class button (type=reset) after the input text , place it in a nested div to be part of the input text only. This worked well and I was happy.&lt;BR /&gt;
But then it stuck me that I had tested this on chrome,so what about other browsers? So, i tried with a few other browsers, worked well on firefox but refused to run on ie10, which led me to some link stating, ie10 might be not supported fully as fasr as browser rendering is considered by Splunk anymore. Now, this is not acceptable, I don't know which browsers end users are using and ie10 is going to be used quite a bit.&lt;BR /&gt;
So, I am back to square one now. I do think though you are correct and I am perhaps trying to achieve something complex without the use of .js AND I also want cross browser compatibility.&lt;BR /&gt;
I am going to keep this open for some time and see if someone else can suggest something else. I doubt though if this can really be improved. &lt;BR /&gt;
At some time i just felt like adding a js and writing a simple CS and closing out this issue! Why take so much trouble for something like this! But maybe I will just wait and see.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Mar 2019 17:55:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419879#M27661</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-03-03T17:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: dashboard clear text in text input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419880#M27662</link>
      <description>&lt;P&gt;So, finally I did this by converting my simple xml to html and adding some div tags and custom style.&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/6645iEDBD88BE79B24719/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;The HTML code for the dropdown, text, input and submit button is as follows&lt;BR /&gt;
    &lt;/P&gt;&lt;FORM&gt;&lt;BR /&gt;
        &lt;DIV class="fieldset"&gt;&lt;BR /&gt;
            &lt;DIV class="input input-dropdown" id="input1"&gt;&lt;BR /&gt;
                &lt;LABEL&gt;Application&lt;/LABEL&gt;&lt;BR /&gt;
            &lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;      &amp;lt;div class="input input-text" id="text4" type="text"&amp;gt;

          &amp;lt;label&amp;gt;Enter Title&amp;lt;/label&amp;gt;
          &amp;lt;input id="reset1" type="reset" value="X"/&amp;gt; 
        &amp;lt;/div&amp;gt;


        &amp;lt;div class="form-submit" id="search_btn" &amp;gt;

            &amp;lt;button class="btn btn-primary submit"&amp;gt;Submit&amp;lt;/button&amp;gt;
        &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;

  &amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Added some small style elements for the X buttons in the text inputs&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;form [id="reset1"] {

     position: absolute;
    border: none;
    display: block;
    width: 16px;
    border-radius: 20px;
   left: 490px;
     top: 75px;                             

    background-color: #ddd;
    padding: 0px;
    margin: 0px;
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The mistake (or my incapability) that I was doing with the earlier attempt is to try to have a custom close icon/button and then try to re-position it inside the text fields. The key thing here is that I used just the simple &lt;CODE&gt;&amp;lt;input id="reset1" type="reset" value="X"/&amp;gt;&lt;/CODE&gt;   instead of a fancy cutsom button, this way I did not need to re-size/re-place my custom button per se. &lt;BR /&gt;
Yes, it does mean that by using the HTML conversion I have compromised with edit features available in simple xml, but there is always a trade off , i guess. Am i entirely happy? No, but it works and does the needed function in all browsers and I did not use any custom js&lt;BR /&gt;
Maybe this will help someone one day&lt;/P&gt;
&lt;/DIV&gt;&lt;/FORM&gt;</description>
      <pubDate>Mon, 04 Mar 2019 17:28:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419880#M27662</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-03-04T17:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: dashboard clear text in text input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419881#M27663</link>
      <description>&lt;P&gt;Yeah, a bit more flexibility with an html dashboard, glad it's working for you.&lt;/P&gt;

&lt;P&gt;I would suggest too, maybe submit an Enhancement Request for this functionality to be added to splunk's built-in textbox?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 17:52:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419881#M27663</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2019-03-04T17:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: dashboard clear text in text input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419882#M27664</link>
      <description>&lt;P&gt;@maciep - Hmm he he will splunk listen to me? But, yes its  something that should be there, we have showclearbutton for dropdown input, it probably won't take much more of an effort for the splunk engineers to have this in a text input as well...thanks for your help on this!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2019 18:10:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419882#M27664</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-03-04T18:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: dashboard clear text in text input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419883#M27665</link>
      <description>&lt;P&gt;@Sukisen1981 I am wondering how you feel converting to HTML a simpler approach than adding Simple XML JS Extension to Simple XML dashboards? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I would think Simple XML JS Extension to be a better fit over HTML Dashboard provided you are comfortable making chnages to Splunk JS stack directly via HTML dashboards. Also if you are willing to sacrifice several new features like &lt;CODE&gt;&amp;lt;init&amp;gt;&lt;/CODE&gt; section, table cell coloring using Simple XML etc.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2019 02:05:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419883#M27665</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-03-05T02:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: dashboard clear text in text input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419884#M27666</link>
      <description>&lt;P&gt;@niketnilay - Thanks for checking this out. I am on 6.6.3 version AND I do not have access to store CSS or JS  files in the static folder, so using something simple like script=".js" and then just write  js and store it externally in the static location, and refer it within my simple xml form is not possible.&lt;BR /&gt;
Is it possible to write js in 6.6.3 in the simple XML file without referencing a js file in an external static location? If I have to convert to HTML mode to write the js, well then I might as well achieve this through the CSS in the HTML code.&lt;BR /&gt;
I quite agree with you that yes, I do loose a lot of flexibility if I convert to HTML dashboard, but I can not see any other option.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 14:51:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419884#M27666</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-03-11T14:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: dashboard clear text in text input</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419885#M27667</link>
      <description>&lt;P&gt;@Sukisen1981 is it possible to create a clear input for text fields in xml for a dashboard?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 04:34:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/dashboard-clear-text-in-text-input/m-p/419885#M27667</guid>
      <dc:creator>reneedeleon</dc:creator>
      <dc:date>2020-03-30T04:34:39Z</dc:date>
    </item>
  </channel>
</rss>

