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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...