Dashboards & Visualizations

splunk 6: form submit no longer triggered by pressing enter

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)

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.

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

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.

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

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

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

Motivator

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

0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!