<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Is it possible to add a button in line with inputs? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388973#M25492</link>
    <description>&lt;P&gt;as mentioned here this style only adjusts the visual width, not the click width. for anyone who is trying to implement this style and also fix the clicking issue, I have posted a separate question here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/758977/how-to-adjust-the-click-width-of-a-js-button.html"&gt;https://answers.splunk.com/answers/758977/how-to-adjust-the-click-width-of-a-js-button.html&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2019 17:32:48 GMT</pubDate>
    <dc:creator>nick405060</dc:creator>
    <dc:date>2019-07-18T17:32:48Z</dc:date>
    <item>
      <title>Is it possible to add a button in line with inputs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388962#M25481</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;

&lt;P&gt;I am looking for a way to include a js button in line with my input selection. Basically I'd like it to look like how the submit button looks like with its inputs:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[TIMEPICKER] [TEXTBOX] [SUBMITBUTTON]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've been able to do it using "link", but am looking for other solutions that look better, since link is gray and the style template isn't being applied correctly.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;panel&amp;gt;  
  &amp;lt;html depends="$alwaysHideCSSPanel$"&amp;gt;
     &amp;lt;style&amp;gt;
       #submit_button .btn-pill{
           background-repeat: repeat-x;
           background-color: #61a637;
           color: #ffa;
           text-shadow: none;
           text-decoration: none;
           border-radius: 4px;
       }
       #submit_button .btn-pill.active{
           background-color: rgba(100,255,100,.05)  !important;
           text-decoration: none  !important;
           color: #500  !important;
           border-radius: 4px  !important;              
       }
     &amp;lt;/style&amp;gt;
  &amp;lt;/html&amp;gt;
  &amp;lt;input type="text" token="networkIdOnChange" searchWhenChanged="false"&amp;gt;
    &amp;lt;label&amp;gt;NetworkID:&amp;lt;/label&amp;gt;
    &amp;lt;default&amp;gt;&amp;lt;/default&amp;gt;
  &amp;lt;/input&amp;gt;
  &amp;lt;input type="text" token="networkid" depends="$justHideMe$" searchWhenChanged="false"&amp;gt;
    &amp;lt;default&amp;gt;$networkIdOnChange$&amp;lt;/default&amp;gt;
  &amp;lt;/input&amp;gt;
  &amp;lt;input type="link" id="submit_button" searchWhenChanged="true"&amp;gt;
    &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
    &amp;lt;choice value="submit"&amp;gt;Submit&amp;lt;/choice&amp;gt;
  &amp;lt;/input&amp;gt;
&amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 15 Jul 2019 22:17:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388962#M25481</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2019-07-15T22:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add a button in line with inputs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388963#M25482</link>
      <description>&lt;P&gt;Same question as &lt;A href="https://answers.splunk.com/answers/696876/how-to-make-html-button-inline-with-simple-xml-sub.html"&gt;https://answers.splunk.com/answers/696876/how-to-make-html-button-inline-with-simple-xml-sub.html&lt;/A&gt;. No answer.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jul 2019 23:33:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388963#M25482</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2019-07-15T23:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add a button in line with inputs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388964#M25483</link>
      <description>&lt;P&gt;Hi @nick405060,&lt;/P&gt;

&lt;P&gt;I encoutered something similar to this. If you inspect the HTML generated by your XML you will realise where the problem lies.&lt;/P&gt;

&lt;P&gt;To solve I assigned an id to panel and then through javascript I added the button as follows:&lt;/P&gt;

&lt;P&gt;XML:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;panel id="mypanel"&amp;gt;  
   &amp;lt;html depends="$alwaysHideCSSPanel$"&amp;gt;
      &amp;lt;style&amp;gt;
        #submit_button .btn-pill{
            background-repeat: repeat-x;
            background-color: #61a637;
            color: #ffa;
            text-shadow: none;
            text-decoration: none;
            border-radius: 4px;
        }
        #submit_button .btn-pill.active{
            background-color: rgba(100,255,100,.05)  !important;
            text-decoration: none  !important;
            color: #500  !important;
            border-radius: 4px  !important;              
        }
      &amp;lt;/style&amp;gt;
   &amp;lt;/html&amp;gt;
   &amp;lt;input type="text" token="networkIdOnChange" searchWhenChanged="false"&amp;gt;
     &amp;lt;label&amp;gt;NetworkID:&amp;lt;/label&amp;gt;
     &amp;lt;default&amp;gt;&amp;lt;/default&amp;gt;
   &amp;lt;/input&amp;gt;
   &amp;lt;input type="text" token="networkid" depends="$justHideMe$" searchWhenChanged="false"&amp;gt;
     &amp;lt;default&amp;gt;$networkIdOnChange$&amp;lt;/default&amp;gt;
   &amp;lt;/input&amp;gt;
 &amp;lt;/panel&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;JavaScript:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;require([
    "jquery",
    "splunkjs/mvc/simplexml/ready!"
], function ($,mvc) {

    $("#mypanel &amp;gt; div &amp;gt; div").append('&amp;lt;div class="input"&amp;gt;&amp;lt;label&amp;gt; &amp;lt;/label&amp;gt;&amp;lt;div class="splunk-view"&amp;gt;&amp;lt;button class="btn" id="submit_button"&amp;gt;Submit&amp;lt;/button&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;')
});
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps,&lt;BR /&gt;
Harsh&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 05:55:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388964#M25483</guid>
      <dc:creator>harshpatel</dc:creator>
      <dc:date>2019-07-16T05:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add a button in line with inputs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388965#M25484</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Try this. I had modified CSS&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;[updated]&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;button&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false" autoRun="false"&amp;gt;&amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;html depends="$hide$"&amp;gt;
      &amp;lt;style&amp;gt;
     #submit_button div[data-component="splunk-core:/splunkjs/mvc/components/LinkList"]
      {
      width:35% !important;
      }

    #submit_button  button  {
      padding: 6px 15px !important;
      border-radius: 3px !important;
      font-weight: 500 !important;
      background-color: #5cc05c !important;
      border: transparent !important;
      color: #fff !important;
  }


  #submit_button  button:hover{
    background-color: #40a540 !important;
    border-color: transparent !important;
  }
    &amp;lt;/style&amp;gt;
    &amp;lt;/html&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;input type="text" token="networkIdOnChange" searchWhenChanged="false"&amp;gt;
        &amp;lt;label&amp;gt;NetworkID:&amp;lt;/label&amp;gt;
        &amp;lt;default&amp;gt;&amp;lt;/default&amp;gt;
      &amp;lt;/input&amp;gt;
      &amp;lt;input type="text" token="networkid" depends="$justHideMe$" searchWhenChanged="false"&amp;gt;
        &amp;lt;default&amp;gt;$networkIdOnChange$&amp;lt;/default&amp;gt;
      &amp;lt;/input&amp;gt;
      &amp;lt;input type="link" id="submit_button" searchWhenChanged="true"&amp;gt;
        &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
        &amp;lt;choice value="submit"&amp;gt;Submit&amp;lt;/choice&amp;gt;
      &amp;lt;/input&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jul 2019 06:13:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388965#M25484</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-07-16T06:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add a button in line with inputs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388966#M25485</link>
      <description>&lt;P&gt;I copied and pasted this exactly in 7.2.0 and there were no style changes to the link.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 16:03:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388966#M25485</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2019-07-16T16:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add a button in line with inputs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388967#M25486</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
&lt;STRONG&gt;[updated]:&lt;/STRONG&gt;&lt;BR /&gt;
Use the below style&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     &amp;lt;style&amp;gt;
        #submit_button div[data-component="splunk-core:/splunkjs/mvc/components/LinkList"]
         {
         width:35% !important;
         }

       #submit_button  button  {
         padding: 6px 15px !important;
         border-radius: 3px !important;
         font-weight: 500 !important;
         background-color: #5cc05c !important;
         border: transparent !important;
         color: #fff !important;
     }


     #submit_button  button:hover{
       background-color: #40a540 !important;
       border-color: transparent !important;
     }
       &amp;lt;/style&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jul 2019 16:24:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388967#M25486</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-07-16T16:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add a button in line with inputs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388968#M25487</link>
      <description>&lt;P&gt;works with this style!!! thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 17:22:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388968#M25487</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2019-07-16T17:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add a button in line with inputs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388969#M25488</link>
      <description>&lt;P&gt;This did not work for me in 7.2.0 using&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; require([
     'jquery',
     'splunkjs/mvc',
     'splunkjs/mvc/simplexml/ready!'
 ], function($,mvc){
     var defaultTokens = mvc.Components.get("default");
     var submittedTokens = mvc.Components.get("submitted");
     $('#submit_button').on("click",function(){
         submittedTokens.set("submit_trigger", ""+Math.random());
         defaultTokens.set("submit_trigger", ""+Math.random());
     });
     $("#mypanel &amp;gt; div &amp;gt; div").append('&amp;lt;div class="input"&amp;gt;&amp;lt;label&amp;gt; &amp;lt;/label&amp;gt;&amp;lt;div class="splunk-view"&amp;gt;&amp;lt;button class="btn" id="submit_button"&amp;gt;Submit&amp;lt;/button&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;');
 });
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
   &amp;lt;label&amp;gt;button&amp;lt;/label&amp;gt;
   &amp;lt;fieldset submitButton="false" autoRun="false"&amp;gt;&amp;lt;/fieldset&amp;gt;
   &amp;lt;row&amp;gt;
     &amp;lt;panel id="mypanel"&amp;gt;
       &amp;lt;html depends="$hide$"&amp;gt;
      &amp;lt;style&amp;gt;
         #submit_button .btn-pill{
             background-repeat: repeat-x;
             background-color: #61a637;
             color: #ffa;
             text-shadow: none;
             text-decoration: none;
             border-radius: 4px;
         }
         #submit_button .btn-pill.active{
             background-color: rgba(100,255,100,.05)  !important;
             text-decoration: none  !important;
             color: #500  !important;
             border-radius: 4px  !important;              
         }
       &amp;lt;/style&amp;gt;
     &amp;lt;/html&amp;gt;
       &amp;lt;input type="text" token="networkIdOnChange" searchWhenChanged="false"&amp;gt;
         &amp;lt;label&amp;gt;NetworkID:&amp;lt;/label&amp;gt;
         &amp;lt;default&amp;gt;&amp;lt;/default&amp;gt;
       &amp;lt;/input&amp;gt;
       &amp;lt;input type="text" token="networkid" depends="$justHideMe$" searchWhenChanged="false"&amp;gt;
         &amp;lt;default&amp;gt;$networkIdOnChange$&amp;lt;/default&amp;gt;
       &amp;lt;/input&amp;gt;
       &amp;lt;input type="link" id="submit_button" searchWhenChanged="true"&amp;gt;
         &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
         &amp;lt;choice value="submit"&amp;gt;Submit&amp;lt;/choice&amp;gt;
       &amp;lt;/input&amp;gt;
     &amp;lt;/panel&amp;gt;
   &amp;lt;/row&amp;gt;
 &amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However my question has been answered in the other answer.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 17:25:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388969#M25488</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2019-07-16T17:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add a button in line with inputs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388970#M25489</link>
      <description>&lt;P&gt;the only issue with this is that it seems the button is invisibly bigger than it is. e.g., if you click to the RIGHT of the button, for another like inch, it also treats it as a button click? @vnravikumar&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2019 17:48:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388970#M25489</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2019-07-16T17:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add a button in line with inputs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388971#M25490</link>
      <description>&lt;P&gt;No, it won't I had checked.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 04:21:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388971#M25490</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-07-17T04:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add a button in line with inputs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388972#M25491</link>
      <description>&lt;P&gt;that behavior is existing for me. not sure why.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2019 17:45:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388972#M25491</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2019-07-17T17:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to add a button in line with inputs?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388973#M25492</link>
      <description>&lt;P&gt;as mentioned here this style only adjusts the visual width, not the click width. for anyone who is trying to implement this style and also fix the clicking issue, I have posted a separate question here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/758977/how-to-adjust-the-click-width-of-a-js-button.html"&gt;https://answers.splunk.com/answers/758977/how-to-adjust-the-click-width-of-a-js-button.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 17:32:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-it-possible-to-add-a-button-in-line-with-inputs/m-p/388973#M25492</guid>
      <dc:creator>nick405060</dc:creator>
      <dc:date>2019-07-18T17:32:48Z</dc:date>
    </item>
  </channel>
</rss>

