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!

Splunk Observability Cloud | Unified Identity - Now Available for Existing Splunk ...

Raise your hand if you’ve already forgotten your username or password when logging into an account. (We can’t ...

Index This | How many sides does a circle have?

February 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

Registration for Splunk University is Now Open!

Are you ready for an adventure in learning?   Brace yourselves because Splunk University is back, and it's ...