<?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: How to add a label to a splunkjs CheckboxView? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-add-a-label-to-a-splunkjs-CheckboxView/m-p/230867#M2963</link>
    <description>&lt;P&gt;Thanks for the response. It turns out that CheckboxView is stylized differently than CheckboxGroupView, so I will use CheckboxGroupView throughout my app.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Jan 2017 09:50:07 GMT</pubDate>
    <dc:creator>bhawkins1</dc:creator>
    <dc:date>2017-01-17T09:50:07Z</dc:date>
    <item>
      <title>How to add a label to a splunkjs CheckboxView?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-add-a-label-to-a-splunkjs-CheckboxView/m-p/230865#M2961</link>
      <description>&lt;P&gt;I want to add a text label next to a splunkjs CheckboxView that displays some text so the user knows what the checkbox does.&lt;/P&gt;

&lt;P&gt;The example at &lt;A href="http://dev.splunk.com/view/SP-CAAAEVJ"&gt;http://dev.splunk.com/view/SP-CAAAEVJ&lt;/A&gt; uses &lt;CODE&gt;label: "Check me",&lt;/CODE&gt;, but this doesn't actually do anything.&lt;/P&gt;

&lt;P&gt;That's consistent with the component ref for checkboxview - &lt;A href="http://docs.splunk.com/DocumentationStatic/WebFramework/1.4/compref_checkbox.html"&gt;http://docs.splunk.com/DocumentationStatic/WebFramework/1.4/compref_checkbox.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Which doesn't have a "label" property.&lt;/P&gt;

&lt;P&gt;How can one add a label to a CheckboxView?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2017 09:17:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-add-a-label-to-a-splunkjs-CheckboxView/m-p/230865#M2961</guid>
      <dc:creator>bhawkins1</dc:creator>
      <dc:date>2017-01-17T09:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a label to a splunkjs CheckboxView?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-add-a-label-to-a-splunkjs-CheckboxView/m-p/230866#M2962</link>
      <description>&lt;P&gt;You are correct in that the class definition does not include it. &lt;/P&gt;

&lt;P&gt;I had a similar issue with the &lt;CODE&gt;TextInputView&lt;/CODE&gt; and &lt;CODE&gt;TimeRangeView&lt;/CODE&gt; classes in my own app.&lt;/P&gt;

&lt;P&gt;I got around this by prepending a raw html &lt;CODE&gt;&amp;lt;label&amp;gt;&lt;/CODE&gt; element to the objects. &lt;/P&gt;

&lt;P&gt;For example,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;// Instantiate components
var mycheckboxview = new CheckboxView({
  id: "mycheckboxview",
  default: false,
  el: $("#mycheckboxview")
}).render();

$('#mycheckboxview').prepend('&amp;lt;label&amp;gt;YOUR LABEL&amp;lt;/label&amp;gt;');
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 17 Jan 2017 09:46:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-add-a-label-to-a-splunkjs-CheckboxView/m-p/230866#M2962</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-01-17T09:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a label to a splunkjs CheckboxView?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-add-a-label-to-a-splunkjs-CheckboxView/m-p/230867#M2963</link>
      <description>&lt;P&gt;Thanks for the response. It turns out that CheckboxView is stylized differently than CheckboxGroupView, so I will use CheckboxGroupView throughout my app.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jan 2017 09:50:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-add-a-label-to-a-splunkjs-CheckboxView/m-p/230867#M2963</guid>
      <dc:creator>bhawkins1</dc:creator>
      <dc:date>2017-01-17T09:50:07Z</dc:date>
    </item>
  </channel>
</rss>

