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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...