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!

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 ...