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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...