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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...