How do you reset a dashboard field after hitting the submit button?

Path Finder

I have a dashboard form that uses free text inputs to write into a CSV file. How do I get the fields to reset after I hit the submit button?

Is it possible to create a dashboard using datepicker to select a date that would write into the lookup?

Tags (1)
0 Karma

Splunk Employee
Splunk Employee

hi @mrtolu6,

Did you have a chance to check out @niketnilay 's answer? If it worked, please resolve this post by approving it! If your problem is still not solved, keep us updated so that someone else can help ya.

Thanks for posting!

0 Karma


@mrtolu6 please try the following run anywhere example. It takes a text input and displays the same in the panel. Once the Panel Search completes the text box token is cleaned up.

The <change> event handler of the text box is used to set the token passed in the search for the panel (using text box's predefined token $value$ to access selected text box value on change). In case the Text box value is null or empty token is not set.

        <condition match="isnotnull($value$) AND $value$!=&quot;&quot;">
          <set token="tokTextFilter">$value$</set>

On completing the search, the <done> event handler is used to <unset> the Text Box value:

            <unset token="form.tokData"></unset>

Please check out the following complete Simple XML code and try out to confirm whether it fits your needs.

  <label>Text Box Token Reset</label>
  <fieldset submitButton="false">
    <input type="text" token="tokData">
        <condition match="isnotnull($value$) AND $value$!=&quot;&quot;">
          <set token="tokTextFilter">$value$</set>
  <row depends="$tokTextFilter$">
          <query>| makeresults 
| fields - _time
| eval data= "$tokTextFilter$"</query>
            <unset token="form.tokData"></unset>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
| makeresults | eval message= "Happy Splunking!!!"


This works to clear the form field.  But the URL is not modified to reflect this fact.  So, if the page gets refreshed by the user or was left open when the browser was shut down and the user has the start where I left off option set the page will rerun the dash board.

How does one clear the field and reset the URL to reflect that fact?

0 Karma


Can you please help reset inputs into a "default" value? I want to set my inputs to "*" after submitting.
Thank you very much.

0 Karma
Take the 2021 Splunk Career Survey

Help us learn about how Splunk has
impacted your career by taking the 2021 Splunk Career Survey.

Earn $50 in Amazon cash!