<?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: Input Type=... Question in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49056#M9318</link>
    <description>&lt;P&gt;So both input[type=risk] { width: 70px !important; min-width: 70px !important; } AND&lt;BR /&gt;
.input-risk{ width: 20px !important; min-width: 20px !important; } should be added to application.css? (sorry about all these questions but must be sure) I have not restarted splunk so I will try that shortly&lt;/P&gt;</description>
    <pubDate>Tue, 14 Sep 2010 17:38:05 GMT</pubDate>
    <dc:creator>Ant1D</dc:creator>
    <dc:date>2010-09-14T17:38:05Z</dc:date>
    <item>
      <title>Input Type=... Question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49047#M9309</link>
      <description>&lt;P&gt;Good Morning, &lt;/P&gt;

&lt;P&gt;I have a question that I would love to be answered if possible. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I have written the following xml code extract inside one of my Splunk forms:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;input type="text" token="fname"&amp;gt;
  &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
  &amp;lt;/input&amp;gt;

  &amp;lt;input type="text" token="lname"&amp;gt;
  &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
  &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I want to change the width of each of these text boxes to different sizes (e.g. fname to 70px and lname to 100px). How can I do this?&lt;/P&gt;

&lt;P&gt;I already know that you can change the width of every textbox input in a Splunk app by adding the following code to a custom application.css file in apps\your_app\appserver\static:&lt;/P&gt;

&lt;P&gt;input
{
width: 70px;
}&lt;/P&gt;

&lt;P&gt;However, how would I be able to change the width property for each specific textbox input that I add to my Splunk app?&lt;/P&gt;

&lt;P&gt;I tried adding the following id attribute to one of the input tags:
&lt;CODE&gt;&amp;lt;input type="text" token="fname" id="myid"&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;then I referenced this in my custom application.css file:
&lt;CODE&gt;#myid&lt;/CODE&gt;
{
width: 70px;
}&lt;/P&gt;

&lt;P&gt;My attempt failed. Maybe because the form xml file is not a .html file. Maybe it is because I am using IE6 browser. 
What should I do to make this work?&lt;/P&gt;

&lt;P&gt;Thanks in advance for your help. Sorry for the essay.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2010 16:03:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49047#M9309</guid>
      <dc:creator>Ant1D</dc:creator>
      <dc:date>2010-09-13T16:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Input Type=... Question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49048#M9310</link>
      <description>&lt;P&gt;This will only work in Browsers that support CSS attribute selectors (all but IE6).&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;input[name=fname] { width: 70px; }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Theres probably no other practical way to style those elements aside from a Javascript-based solution.&lt;/P&gt;

&lt;P&gt;EDIT:&lt;/P&gt;

&lt;P&gt;This is the hacky solution that should work in IE6 as well:&lt;/P&gt;

&lt;P&gt;$SPLUNK_HOME/etc/apps/YOUR_APP/appserver/static/application.css:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.input-fname{ width: 20px !important; min-width: 20px !important; }
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(!important stuff is to override styles defined in Splunks ExtendedFieldSearch.css. Use &lt;A href="http://getfirebug.com/" rel="nofollow"&gt;Firebug&lt;/A&gt; to inspect those styles)&lt;/P&gt;

&lt;P&gt;$SPLUNK_HOME/etc/apps/YOUR_APP/appserver/static/application.js:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$(function(){
    $('input[name=fname]').addClass("input-fname");
});
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 13 Sep 2010 20:40:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49048#M9310</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-09-13T20:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Input Type=... Question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49049#M9311</link>
      <description>&lt;P&gt;thanks, I know about this solution but I cannot use it unfortunately &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2010 22:57:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49049#M9311</guid>
      <dc:creator>Ant1D</dc:creator>
      <dc:date>2010-09-13T22:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Input Type=... Question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49050#M9312</link>
      <description>&lt;P&gt;Does your solution definitely work?&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2010 22:58:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49050#M9312</guid>
      <dc:creator>Ant1D</dc:creator>
      <dc:date>2010-09-13T22:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Input Type=... Question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49051#M9313</link>
      <description>&lt;P&gt;Hey, thanks. Is it possible if you could confirm that your solution definitely works? copying and pasting into the appropriate files does not work&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2010 15:42:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49051#M9313</guid>
      <dc:creator>Ant1D</dc:creator>
      <dc:date>2010-09-14T15:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Input Type=... Question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49052#M9314</link>
      <description>&lt;P&gt;In order to write .input-fname{...} wouldn't I need to add a class attribute to the &lt;INPUT type="..." /&gt; part of my xml code?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2010 15:45:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49052#M9314</guid>
      <dc:creator>Ant1D</dc:creator>
      <dc:date>2010-09-14T15:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Input Type=... Question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49053#M9315</link>
      <description>&lt;P&gt;Yes, it worked for me. No you don't need to add a class attribute. The Javascript part does this after rendering.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2010 16:02:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49053#M9315</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-09-14T16:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Input Type=... Question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49054#M9316</link>
      <description>&lt;P&gt;I tried it again, I can't get it to work &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; I have copied and pasted those lines into the specified files. Do I also include input[name=fname] { width: 70px; } ? Any ideas why it is not working at my end?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2010 16:25:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49054#M9316</guid>
      <dc:creator>Ant1D</dc:creator>
      <dc:date>2010-09-14T16:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Input Type=... Question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49055#M9317</link>
      <description>&lt;P&gt;Did you restart Splunk? You should add input[type=fname] { width: 70px !important; min-width: 70px !important; }&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2010 17:35:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49055#M9317</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2010-09-14T17:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Input Type=... Question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49056#M9318</link>
      <description>&lt;P&gt;So both input[type=risk] { width: 70px !important; min-width: 70px !important; } AND&lt;BR /&gt;
.input-risk{ width: 20px !important; min-width: 20px !important; } should be added to application.css? (sorry about all these questions but must be sure) I have not restarted splunk so I will try that shortly&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2010 17:38:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49056#M9318</guid>
      <dc:creator>Ant1D</dc:creator>
      <dc:date>2010-09-14T17:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Input Type=... Question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49057#M9319</link>
      <description>&lt;P&gt;I have it working now. Thanks a bunch for your help &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2010 18:00:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49057#M9319</guid>
      <dc:creator>Ant1D</dc:creator>
      <dc:date>2010-09-14T18:00:33Z</dc:date>
    </item>
    <item>
      <title>Re: Input Type=... Question</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49058#M9320</link>
      <description>&lt;P&gt;The restart made the difference as opposed to F5 or Ctrl + F5&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2010 18:10:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Input-Type-Question/m-p/49058#M9320</guid>
      <dc:creator>Ant1D</dc:creator>
      <dc:date>2010-09-14T18:10:44Z</dc:date>
    </item>
  </channel>
</rss>

