<?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 How to change the label for a Submit button in HTML? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-the-label-for-a-Submit-button-in-HTML/m-p/119496#M6943</link>
    <description>&lt;P&gt;I have a form that contains a submit button and it has been converted to HTML so that I can change the label from "Search" to "Submit". However, this does not work. Here is the code that Splunk created for me when I chose to "Convert to HTML":&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;div class="input form-submit" id="search_btn"&amp;gt;
        &amp;lt;button class="btn btn-primary submit"&amp;gt;Search&amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I should just have to change the description, right? To this?:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;div class="input 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;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It still shows "Search" as the label for the button on the form when using the second example. If I change or remove the id tag (id="submit_btn"), then the label changes to whatever I put right before the  tag, but then the submit functionality does not work. Does anyone know what is going on here? Splunk version 6.0.2.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Wed, 10 Sep 2014 19:46:37 GMT</pubDate>
    <dc:creator>cwilmoth</dc:creator>
    <dc:date>2014-09-10T19:46:37Z</dc:date>
    <item>
      <title>How to change the label for a Submit button in HTML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-the-label-for-a-Submit-button-in-HTML/m-p/119496#M6943</link>
      <description>&lt;P&gt;I have a form that contains a submit button and it has been converted to HTML so that I can change the label from "Search" to "Submit". However, this does not work. Here is the code that Splunk created for me when I chose to "Convert to HTML":&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;div class="input form-submit" id="search_btn"&amp;gt;
        &amp;lt;button class="btn btn-primary submit"&amp;gt;Search&amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I should just have to change the description, right? To this?:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;div class="input 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;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It still shows "Search" as the label for the button on the form when using the second example. If I change or remove the id tag (id="submit_btn"), then the label changes to whatever I put right before the  tag, but then the submit functionality does not work. Does anyone know what is going on here? Splunk version 6.0.2.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2014 19:46:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-the-label-for-a-Submit-button-in-HTML/m-p/119496#M6943</guid>
      <dc:creator>cwilmoth</dc:creator>
      <dc:date>2014-09-10T19:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the label for a Submit button in HTML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-the-label-for-a-Submit-button-in-HTML/m-p/119497#M6944</link>
      <description>&lt;P&gt;If you remove the id and the form uses what you put, then the text of the button is actually being changed via javascript/css.  You might want to look at what css/js is applied by viewing the source of the displayed page, and looking through those files to see what gets applied to search_btn.  Then, modify those files, or put your own inline html/css/js on the form to control the text after Splunk's default text is applied.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2014 20:06:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-the-label-for-a-Submit-button-in-HTML/m-p/119497#M6944</guid>
      <dc:creator>hortonew</dc:creator>
      <dc:date>2014-09-10T20:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the label for a Submit button in HTML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-the-label-for-a-Submit-button-in-HTML/m-p/119498#M6945</link>
      <description>&lt;P&gt;If you changed to HTML you can add the text attribute to the button definition in the JS:&lt;BR /&gt;
(as posted here: &lt;A href="https://answers.splunk.com/answers/147151/change-the-submit-button-text-in-splunk-6-1-simple-xml-dashboard.html"&gt;https://answers.splunk.com/answers/147151/change-the-submit-button-text-in-splunk-6-1-simple-xml-dashboard.html&lt;/A&gt;)&lt;/P&gt;

&lt;P&gt;var submit = new SubmitButton({&lt;BR /&gt;
   id: 'submit',&lt;BR /&gt;
   el: $('#search_btn'),&lt;BR /&gt;
   text: 'Update'&lt;BR /&gt;
 }, {tokens: true}).render();&lt;/P&gt;

&lt;P&gt;If you want to keep it as SimpleXML you can add the following to your page JS file (within the document ready function):&lt;/P&gt;

&lt;P&gt;$('.submit').html('Update'); // during loading&lt;BR /&gt;
$('.submit').bind("DOMSubtreeModified",function() { // when SplunkJS tries to change it&lt;BR /&gt;
    $('.submit').html('Update');&lt;BR /&gt;
}); &lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2016 00:41:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-the-label-for-a-Submit-button-in-HTML/m-p/119498#M6945</guid>
      <dc:creator>krschwar</dc:creator>
      <dc:date>2016-03-24T00:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to change the label for a Submit button in HTML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-the-label-for-a-Submit-button-in-HTML/m-p/119499#M6946</link>
      <description>&lt;P&gt;The problem with your second part is that, in Internet Explorer 11, the change of the label fires itself a DOMSubtreeModified event, which creates an infinite loop and freezes the browser.&lt;/P&gt;

&lt;P&gt;Plus DOMSubtreeModified and similar events are deprecated.&lt;/P&gt;

&lt;P&gt;Here's something that works better :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  var submitButton = $("#submit button");
  submitButton.text("Update");
  new MutationObserver(function() {
      this.disconnect();
      submitButton.text("Update");
      this.observe(submitButton[0], {childList: true});
  }).observe(submitButton[0], {childList: true});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Aug 2018 22:13:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-change-the-label-for-a-Submit-button-in-HTML/m-p/119499#M6946</guid>
      <dc:creator>manur</dc:creator>
      <dc:date>2018-08-30T22:13:55Z</dc:date>
    </item>
  </channel>
</rss>

