title: How to hide the label for the hidden field
body: <p>I have been trying to hide the label of the hidden field defined in a model class using Django api. The CRUD operations of the model are managed by Django admin.</p>
  
  <p>My model is </p>
  
  <pre><code>class RackForm(django.forms.ModelForm):
  
    def __init__(self, *args, **kwargs):
       self.fields['racktypeid'].widget = \
           forms.HiddenInput(attrs={'styles': 'display:none;'})
       ..... other initialization
  </code></pre>
  
  <p>The generated html source is given below</p>
  
  <pre><code>&lt;div class="form-row racktypeid"&gt;
  
  
              &lt;div&gt;
  
                      **&lt;label for="id_racktypeid" class="required"&gt;Rack Type:&lt;/label&gt;**
  
                          **&lt;input styles="display:none;" name="racktypeid" value="3" onchange="changeRackType(this);" type="hidden" id="id_racktypeid" /&gt;**
  
  
  
  
                      &lt;p class="help"&gt;The physical type of rack as defined in the rack type list&lt;/p&gt;
  
              &lt;/div&gt;
  
      &lt;/div&gt;
  </code></pre>
  
  <p>The field has been hidden but not the associated label. I have even tried using jQuery for it. I may be wrong with the syntax. If I am, please correct me if I am wrong.</p>
  
  <pre><code>$(document).ready(function() {
      // Hide label for RackForm rack type id label.
     $('#id_racktypeid, label[for="#id_racktypeid"]').hide()
      $('#id_racktypeid, label[for="#id_racktypeid"]').parent().hide()
    });
  });
  </code></pre>
  
  <p>None of the options succeed. Is there anything I need to do hide the label of the hidden field? </p>
  
  <p>Update: Eventually I chose to hide the entire div tag.</p>