Dashboards & Visualizations

splunk 6: form submit no longer triggered by pressing enter

dominiquevocat
Motivator

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
Motivator

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
Motivator

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

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...