<?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: How to display a message after clicking the &amp;quot;Submit&amp;quot; button on the dashboard based on radio button selection? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387543#M25407</link>
    <description>&lt;P&gt;ugh... it would be nice if there was a way to do this solely on submit click without js&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jun 2019 23:16:15 GMT</pubDate>
    <dc:creator>nick405060</dc:creator>
    <dc:date>2019-06-11T23:16:15Z</dc:date>
    <item>
      <title>How to display a message after clicking the "Submit" button on the dashboard based on radio button selection?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387535#M25399</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I want to display a message after clicking the "Submit" button on the dashboard based on the radio button selection. So, if I select the "Panel-1" and click on Submit button, it should display a message "Panel-1 selected".&lt;/P&gt;

&lt;P&gt;Thanks a lot for your help in advance!&lt;/P&gt;

&lt;P&gt;My sample code: &lt;/P&gt;

&lt;P&gt;Choose a panel&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="radio" token="panel"&amp;gt;
  &amp;lt;label&amp;gt;Panel-List&amp;lt;/label&amp;gt;
  &amp;lt;choice value="1"&amp;gt;Panel 1&amp;lt;/choice&amp;gt;
  &amp;lt;choice value="2"&amp;gt;Panel 2&amp;lt;/choice&amp;gt;
  &amp;lt;change&amp;gt;
    &amp;lt;condition value="1"&amp;gt;
      &amp;lt;set token="pan1"&amp;gt;&amp;lt;/set&amp;gt;
      &amp;lt;unset token="pan2"&amp;gt;&amp;lt;/unset&amp;gt;
    &amp;lt;/condition&amp;gt;
    &amp;lt;condition value="2"&amp;gt;
      &amp;lt;set token="pan2"&amp;gt;&amp;lt;/set&amp;gt;
      &amp;lt;unset token="pan1"&amp;gt;&amp;lt;/unset&amp;gt;
    &amp;lt;/condition&amp;gt;
  &amp;lt;/change&amp;gt;
&amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Aug 2018 22:59:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387535#M25399</guid>
      <dc:creator>kulsplunk</dc:creator>
      <dc:date>2018-08-07T22:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a message after clicking the "Submit" button on the dashboard based on radio button selection?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387536#M25400</link>
      <description>&lt;P&gt;Hello @kulsplunk,&lt;/P&gt;

&lt;P&gt;where do you want the message to be displayed? On the dashboard? In an alert popup?&lt;/P&gt;

&lt;P&gt;Can you please give more details?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 06:37:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387536#M25400</guid>
      <dc:creator>poete</dc:creator>
      <dc:date>2018-08-08T06:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a message after clicking the "Submit" button on the dashboard based on radio button selection?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387537#M25401</link>
      <description>&lt;P&gt;Hi Poete, I wanted to display the message on the dashboard right next to the "Submit" button. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 15:50:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387537#M25401</guid>
      <dc:creator>kulsplunk</dc:creator>
      <dc:date>2018-08-08T15:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a message after clicking the "Submit" button on the dashboard based on radio button selection?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387538#M25402</link>
      <description>&lt;P&gt;Hi @kulsplunk,&lt;/P&gt;

&lt;P&gt;Have you tried by setting up token on change event? Can you please try below example?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Submit Button Msg&amp;lt;/label&amp;gt;
  &amp;lt;init&amp;gt;
    &amp;lt;set token="msg"&amp;gt; &amp;lt;/set&amp;gt;
  &amp;lt;/init&amp;gt;
  &amp;lt;fieldset submitButton="true"&amp;gt;
    &amp;lt;input type="radio" token="panel"&amp;gt;
   &amp;lt;label&amp;gt;Panel-List&amp;lt;/label&amp;gt;
   &amp;lt;choice value="1"&amp;gt;Panel 1&amp;lt;/choice&amp;gt;
   &amp;lt;choice value="2"&amp;gt;Panel 2&amp;lt;/choice&amp;gt;
   &amp;lt;change&amp;gt;
     &amp;lt;set token="msg"&amp;gt;$label$ selected&amp;lt;/set&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;html&amp;gt;
        $msg$
      &amp;lt;/html&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>Wed, 08 Aug 2018 16:52:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387538#M25402</guid>
      <dc:creator>kamlesh_vaghela</dc:creator>
      <dc:date>2018-08-08T16:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a message after clicking the "Submit" button on the dashboard based on radio button selection?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387539#M25403</link>
      <description>&lt;P&gt;Hi @kamlesh_vaghela ,&lt;/P&gt;

&lt;P&gt;Thanks for your response. Actually I want to display the message on "Submit" button click, not based on the radio button selection. This example just shows the message based on my radio button selection. Is it possible to write code on OnSubmit within simpleXML code? Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 16:42:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387539#M25403</guid>
      <dc:creator>kulsplunk</dc:creator>
      <dc:date>2018-08-09T16:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a message after clicking the "Submit" button on the dashboard based on radio button selection?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387540#M25404</link>
      <description>&lt;P&gt;@kulsplunk, Could you please add the details  on  why you don't need JavaScript dependency? Would you be able to HTML Dashboard, that way you can have JavaScript in front-end?&lt;/P&gt;

&lt;P&gt;If you can use Splunk's &lt;CODE&gt;Submit&lt;/CODE&gt; button input (provided you move the logic from input &lt;CODE&gt;&amp;lt;change&amp;gt;&lt;/CODE&gt; to an independent &lt;CODE&gt;&amp;lt;search&amp;gt;&lt;/CODE&gt;), you can try an approach like the following run anywhere example.&lt;/P&gt;

&lt;P&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/5485i8CEC658B77210928/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;Following is the simple XML code for the run anywhere example which uses Splunk's _internal index:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Submit Button Testing&amp;lt;/label&amp;gt;
  &amp;lt;!-- Independent search to set the token for Panel on Click of Submit button.
  1) Input Change Event Handler has not been used as token will then be available on change and not after submit button click.
  2) In order ro access token value after the click of Submit button i.e. from Submitted Token Model independent search has been used.
  --&amp;gt;
  &amp;lt;search&amp;gt;
    &amp;lt;query&amp;gt;| makeresults
| eval Panel=$tokPanel|s$
    &amp;lt;/query&amp;gt;
    &amp;lt;done&amp;gt;
      &amp;lt;condition match="$result.Panel$==&amp;amp;quot;1&amp;amp;quot;"&amp;gt;
        &amp;lt;set token="tokPanelSelected"&amp;gt;1&amp;lt;/set&amp;gt;
        &amp;lt;set token="pan1"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;unset token="pan2"&amp;gt;&amp;lt;/unset&amp;gt;
      &amp;lt;/condition&amp;gt;
      &amp;lt;condition match="$result.Panel$==&amp;amp;quot;2&amp;amp;quot;"&amp;gt;
        &amp;lt;unset token="pan1"&amp;gt;&amp;lt;/unset&amp;gt;
        &amp;lt;set token="pan2"&amp;gt;&amp;lt;/set&amp;gt;
        &amp;lt;set token="tokPanelSelected"&amp;gt;2&amp;lt;/set&amp;gt;
      &amp;lt;/condition&amp;gt;
      &amp;lt;condition&amp;gt;
        &amp;lt;unset token="tokPanelSelected"&amp;gt;&amp;lt;/unset&amp;gt;
      &amp;lt;/condition&amp;gt;
    &amp;lt;/done&amp;gt;
  &amp;lt;/search&amp;gt;
  &amp;lt;fieldset submitButton="true"&amp;gt;
    &amp;lt;input type="dropdown" token="tokPanel" searchWhenChanged="false"&amp;gt;
      &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;choice value="1"&amp;gt;One&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="2"&amp;gt;Two&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;1&amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;Msg Panel Selected: $tokPanelSelected$&amp;lt;/title&amp;gt;
      &amp;lt;html/&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel depends="$pan1$"&amp;gt;
      &amp;lt;title&amp;gt;Panel 1&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal sourcetype=splunkd log_level!=INFO 
| top 5 component showperc=f&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-1d@d&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;-0d@d&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;pie&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
    &amp;lt;panel depends="$pan2$"&amp;gt;
      &amp;lt;title&amp;gt;Panel 2&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=_internal sourcetype=splunkd log_level!=INFO 
| timechart count by component limit=5 useother=f&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-1d@d&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;-0d@d&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;line&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/chart&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>Sat, 11 Aug 2018 11:11:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387540#M25404</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-08-11T11:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a message after clicking the "Submit" button on the dashboard based on radio button selection?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387541#M25405</link>
      <description>&lt;P&gt;Thanks much @niketnilay ! I like the way you have used the Token Model independent search. It solves my display issue, however I've a dependency of "Input change event handler" because I have two hidden panels and I want to display only one panel based on the selected radio button. With your solution, I will have to click the Submit button to display the message and the panel. &lt;/P&gt;

&lt;P&gt;I guess it would be better to use the javascript to get both problem solved. I would appreciate if you could share any sample code. &lt;/P&gt;

&lt;P&gt;Thanks a lot!!&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 18:10:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387541#M25405</guid>
      <dc:creator>kulsplunk</dc:creator>
      <dc:date>2018-08-16T18:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a message after clicking the "Submit" button on the dashboard based on radio button selection?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387542#M25406</link>
      <description>&lt;P&gt;@kulsplunk , refer to one of my older answers to Use Splunk XML JS Extension along with Splunk JS to control tokens in Submitted and Default Token Models: &lt;A href="https://answers.splunk.com/answers/581652/how-can-i-create-a-button-switcher.html"&gt;https://answers.splunk.com/answers/581652/how-can-i-create-a-button-switcher.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Aug 2018 05:19:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387542#M25406</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-08-19T05:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to display a message after clicking the "Submit" button on the dashboard based on radio button selection?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387543#M25407</link>
      <description>&lt;P&gt;ugh... it would be nice if there was a way to do this solely on submit click without js&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jun 2019 23:16:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-display-a-message-after-clicking-the-quot-Submit-quot/m-p/387543#M25407</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2019-06-11T23:16:15Z</dc:date>
    </item>
  </channel>
</rss>

