Dashboards & Visualizations

Reset Textbox input on changing selection of a radio button

vaibhavagg2006
Communicator

Hi Experts

I have a textbox and 2 radio buttons in a dashboard. I want to reset the textbox to empty on click of the radio button. I am able to unset the token by using the set/unset token but the text in the textbox does not go away. Is it possible to change/remove the text of the textbox on click of the radio button.

 

Thanks in Advance!

Labels (1)
Tags (3)
0 Karma
1 Solution

scelikok
SplunkTrust
SplunkTrust

Hi @vaibhavagg2006,

You should unset the token again with form prefix. Please see below example;

  <fieldset submitButton="false">
    <input type="radio" token="reset_tokens" searchWhenChanged="true">
      <label></label>
      <choice value="reset">Reset Token</choice>
      <change>
        <set token="component_token">*</set>
        <unset token="reset_tokens"></unset>
        <unset token="form.reset_tokens"></unset>
      </change>
    </input>
  </fieldset>

 

If this reply helps you an upvote and "Accept as Solution" is appreciated.

View solution in original post

scelikok
SplunkTrust
SplunkTrust

Hi @vaibhavagg2006,

You should unset the token again with form prefix. Please see below example;

  <fieldset submitButton="false">
    <input type="radio" token="reset_tokens" searchWhenChanged="true">
      <label></label>
      <choice value="reset">Reset Token</choice>
      <change>
        <set token="component_token">*</set>
        <unset token="reset_tokens"></unset>
        <unset token="form.reset_tokens"></unset>
      </change>
    </input>
  </fieldset>

 

If this reply helps you an upvote and "Accept as Solution" is appreciated.

vaibhavagg2006
Communicator

It worked, Thanks!

0 Karma
Get Updates on the Splunk Community!

Splunk Edge Processor | Popular Use Cases to Get Started with Edge Processor

Splunk Edge Processor offers more efficient, flexible data transformation – helping you reduce noise, control ...

Introducing New Splunkbase Governance!

Splunk apps are essential for maximizing the value of your Splunk Experience. Whether you’re using the default ...

3 Ways to Make OpenTelemetry Even Better

My role as an Observability Specialist at Splunk provides me with the opportunity to work with customers of ...