Dashboards & Visualizations

How to increase height of input text box html dashboard

New Member

Hi, i've been banging my head against the wall for a while on this one.
I have an HTML dashboard that i would like users to be able to input details on particular issues.
These updates will generally be paragraphs of text.

As such i've been trying to give the users an expanded box in which to put their details and have so far failed.
I've tried inline height: 500px - nothing, ive tried in an external css, width works fine (so i know it the right syntax) , but no joy.

So my question is this.
Is there a way to make a text box have a multi line expanded input in html splunk?
Alternatively is there a way to use textarea and have the contents be the value of an input token?

Many thanks in advance

Tags (1)
0 Karma


@danosoclive, you would need <html> textarea input for this to work which is not a default input in Splunk. However if you follow the blog by @jconger, Using HTML5 Input Types on Splunk Forms, you can have html input of your choice in your Splunk Form including Text Area. You would also need a companion Simple XML JS Extension file to capture the changes in the Text Area input and set/unset the required token accordingly.

Following is a run anywhere example to have Multiline Text Area input like Comment in Splunk.

alt text

Following is the run anywhere example Simple XML Code:

<dashboard script="html_text_area_input.js">
  <label>Multi-line Text Box Area as Splunk Input using Simple XML JS Extension</label>
    <set token="tokComment">Not Applicable.</set>
            width: 500px;
            height: 115px;            
          <label>Enter Comment</label>
          <textarea id="html_ta_user_comment" name="comment" rows="10" cols="30">Not Applicable.</textarea>
          <query>| makeresults
| fields - _time
| eval "Text Entered"=$tokComment|s$</query>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="refresh.display">progressbar</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>

Following is the Simple XML JS Extension file html_text_area_input.js to be placed under Splunk app's appserver/static folder (may require debug refresh, bump or splunk restart along with internet browser history cleanup).

    function($, mvc) {
    var defaultTokenModel = mvc.Components.get("default");
    var submitTokenModel = mvc.Components.get("submitted");
        var strComment=$(this).val();
        var strTokComment=defaultTokenModel.get("tokComment");
        if(strComment!=="" && strComment!==undefined){
            if(strTokComment!==undefined || strTokComment!==strComment){
| makeresults | eval message= "Happy Splunking!!!"

New Member

Hi niketnilay,

Thankyou for your comprehensive response.
However I cannot seem to get the above to work at all.
I can now define a text area and have initialised the token but it will not update the token 'on("change")' when I type something in, or at least it does not show me that it has changed. Any idea what could be going wrong?!


0 Karma

New Member

A bit of jiggery pokery later and I managed to make it work, and have successfully implemented into a HTML dashboard. Thanks for your help neketnilay !

0 Karma


Can you be more specific about what you changed?

0 Karma


Can you please tell me how  you made it "change "?

0 Karma

Splunk Employee
Splunk Employee
0 Karma
Get Updates on the Splunk Community!

Improve Your Security Posture

Watch NowImprove Your Security PostureCustomers are at the center of everything we do at Splunk and security ...

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...