Dashboards & Visualizations

splunk 6: form submit no longer triggered by pressing enter

dominiquevocat
SplunkTrust
SplunkTrust

the behaviour of forms seems to have changed in splunk 6, in previous versions one could hit enter to submit the form search button... is there a way to change this default behaviour?

Tags (2)

wrangler2x
Motivator

You can make it accept enter by adding searchWhenChanged="true" to the input line. Two examples for you -- the first a text input and the second a timepicker (so you don't have to submit, just change the time and the search runs):

Text input:

<input type="text" token="UCInetID" searchWhenChanged="true"/>

Time picker:

<input type="time" searchWhenChanged="true">
          <default>Last 4 hours</default>
 </input>

On the text input, hitting return will cause the search to run.

wrangler2x
Motivator

I just ran across an old input form which did not allow to execute on a text input. I made the change I mentioned above and it works great. If you tried this and it worked for you, please vote this up.

0 Karma

helge
Builder

The UX is a lot better if the user, after having changed some search text in a text input can simply press ENTER without having to click "Submit". Removing the submit button is not an option where longer running searches are involved.

nfilippi_splunk
Splunk Employee
Splunk Employee

You can remove the submit button entirely, which would submit all form inputs when any change is made.

It would look like this:




0 Karma

dominiquevocat
SplunkTrust
SplunkTrust

hi, certainly worth a look.
i do have forms where there is a text inputfield and a time range picker... the searches are costly since it involves several dbx backends and several costly ldap queries (realtime) so i am not sure if it is a good workarround. I really would like to have the form.submit button be the default for pressing enter in a form text field.

0 Karma

helenashton
Path Finder

Did you find any way to get this to work? I am using Simple XML (with JS), and would like to have the same functionality.

0 Karma

dominiquevocat
SplunkTrust
SplunkTrust

Nope, we just live with it. Incidentally i will close the question.

0 Karma
Get Updates on the Splunk Community!

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!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...