Dashboards & Visualizations

Submit Button not working

nabeel652
Builder

Everything works fine until I add a submit button. Can someone tell me what is the problem with this dashboard.

Not getting any error message but Submit button simply doesn't work. When I change options in the input controls sometimes it is just submitted to the panel without pressing the submit button and sometime doesn't event after pressing the submit button.

<form>
  <label>Test Dashboard</label>
  <fieldset autoRun="false" submitButton="true">
    <input type="text" token="kwsearch">
      <label>Keyword</label>
      <change>
        <eval token="form.result">if($form.exact$=="0","*".$form.kwsearch$."*",$form.kwsearch$)</eval>
      </change>
    </input>
    <input type="radio" token="exact">
      <label>Exact Match</label>
      <choice value="0">False</choice>
      <choice value="1">True</choice>
      <default>0</default>
      <initialValue>0</initialValue>
      <change>
        <eval token="form.result">if($form.exact$=="0","*".$form.kwsearch$."*",$form.kwsearch$)</eval>
      </change>
    </input>
    <input type="text" token="result">
      <label>Result</label>
    </input>
  </fieldset>
  <row>
    <panel>
      <title>Results=== $form.result$       exact===$form.exact|s$</title>
      <table>
        <search>
          <query>| makeresults | fields - _time | eval Product="$form.result$" | table Product</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="count">10</option>
        <option name="drilldown">none</option>
        <option name="refresh.display">progressbar</option>
      </table>
    </panel>
  </row>
</form>
1 Solution

niketn
Legend

@nabeel652 refer to some of my previous answers for Submit Button behavior with reference to Default Token Model and Submitted Token model. Hope it clarifies the concept and proper user case and workaround.

https://answers.splunk.com/answers/679596/what-is-the-expected-behavior-for-submit-button-wh.html
https://answers.splunk.com/answers/742451/searchwhenchangedfalse-not-honored-1.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

0 Karma

niketn
Legend

@nabeel652 refer to some of my previous answers for Submit Button behavior with reference to Default Token Model and Submitted Token model. Hope it clarifies the concept and proper user case and workaround.

https://answers.splunk.com/answers/679596/what-is-the-expected-behavior-for-submit-button-wh.html
https://answers.splunk.com/answers/742451/searchwhenchangedfalse-not-honored-1.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

DavidHourani
Super Champion

Hi @nabeel562, what kind of error messages are you getting ?

0 Karma

nabeel652
Builder

@DavidHourani
Well not getting any message but Submit button simply doesn't work. When I change options in the input controls sometimes it is just submitted to the panel without pressing the submit button and sometime doesn't event after pressing the submit button.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...