Dashboards & Visualizations

Is it possible to create an input field with textarea (html) and set a token?

Path Finder

I can populate the field with the following in Simple XML with html tags, however, the token is not getting set if the user enters any information and then clicks on the submit button.

<textarea token="field_explanation" rows="20" cols="50">
    Here is the explanation.
</textarea>

Basically, my requirement is to let user input with lines in the explanation field. I am fine if it's possible with the input tag.

<input type="text" token="field_explanation" searchWhenChanged="false">
  <label>Provide Explanation</label>
  <default>NA</default>
</input>

Any way to make this happen?

Amit

0 Karma

SplunkTrust
SplunkTrust

The answer is no, you cant use textarea in the simplexml forms. You can however create custom css and increase the width and height.

https://answers.splunk.com/answers/338211/shifting-from-advanced-xml-to-simple-xml-how-to-re.html
http://docs.splunk.com/Documentation/Splunk/6.3.2/AdvancedDev/UseCSS

0 Karma

Path Finder

We ended up creating js and css to handle the token population for textarea!

0 Karma

SplunkTrust
SplunkTrust

As somesoni2 has mentioned, they'd have to type their entire input into the text box. Best suggestion I can give is write the "explanation" in notepad, then copy and paste into text field. I assume you're creating a dashboard that is pushing data to a ticketing system, etc. It's not common to need a large text area.

0 Karma

Path Finder

Consider my requirement is something similar to when I am replying to this message. It shows "Add your comments .... ", when I click on it, I can see a proper text area where I can write my comments. The user experience would not be that great if there was a text input set here.

0 Karma

SplunkTrust
SplunkTrust

You can probably use css to increase the size of the text input, for better feel.

0 Karma

Path Finder

We had implemented js to perform the required token set from the textarea. It worked well!

0 Karma

SplunkTrust
SplunkTrust

I just don't understand why you would need a paragraph as a search variable that's all. Regardless it will require something very custom and I'm not certain you'll have much luck here.
The short answer is textarea isn't compatible with simple xml dashboards form inputs.

0 Karma

SplunkTrust
SplunkTrust

The input text should let the users type in text and set the entered text as the token. Have you tried using the text input yet?

0 Karma

Path Finder

Text input is the one I have been using and I can extend the length (column) of it but not the height (rows).

0 Karma