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!

The Latest Cisco Integrations With Splunk Platform!

Join us for an exciting tech talk where we’ll explore the latest integrations in Cisco &#43; Splunk! We’ve ...

Enterprise Security Content Update (ESCU) | New Releases

In April, the Splunk Threat Research Team had 2 releases of new security content via the Enterprise Security ...

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

What are Community Office Hours?Community Office Hours is an interactive 60-minute Zoom series where ...