title: Django. How to completely hide the fields in the form?
body: <p>Tell me, please, how to completely hide the fields in the form, now only the field is hidden, but the name of the field remains?</p>
  
  <p><a href="https://i.stack.imgur.com/uaLge.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uaLge.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/HHnt3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HHnt3.png" alt="enter image description here"></a></p>
  
  <p>Model:</p>
  
  <pre><code>class Listing(models.Model):
      realtor = models.ForeignKey(Realtor, on_delete=models.CASCADE, verbose_name='Риелтор')
      category = models.ForeignKey(Category, on_delete=models.CASCADE, verbose_name='Категория')
      region = models.ForeignKey(Region, on_delete=models.CASCADE, verbose_name='Область')
      city = models.ForeignKey(City, on_delete=models.CASCADE, verbose_name='Город')
      district = models.ForeignKey(District, on_delete=models.CASCADE, verbose_name='Район')
      title = models.CharField(max_length=200, verbose_name='Заголовок')
      landmark = models.CharField(blank=True, max_length=200, verbose_name='Ориентир')
      description = models.TextField(blank=True, verbose_name='Описание')
      series = models.ForeignKey(Series, on_delete=models.CASCADE, verbose_name='Серия')
      rooms = models.IntegerField(default=0, blank=True, verbose_name='Количество комнат')
      sqmt = models.IntegerField(default=0, blank=True, verbose_name='Площадь')
      price = models.IntegerField(default=0, blank=True, verbose_name='Цена')
      photo_main = models.ImageField(upload_to='photos/%Y/%m/%d/', blank=True, verbose_name='Основное фото')
      photo_1 = models.ImageField(upload_to='photos/%Y/%m/%d/', blank=True, verbose_name='Фото 1')
      photo_2 = models.ImageField(upload_to='photos/%Y/%m/%d/', blank=True, verbose_name='Фото 2')
      photo_3 = models.ImageField(upload_to='photos/%Y/%m/%d/', blank=True, verbose_name='Фото 3')
      photo_4 = models.ImageField(upload_to='photos/%Y/%m/%d/', blank=True, verbose_name='Фото 4')
      photo_5 = models.ImageField(upload_to='photos/%Y/%m/%d/', blank=True, verbose_name='Фото 5')
      photo_6 = models.ImageField(upload_to='photos/%Y/%m/%d/', blank=True, verbose_name='Фото 6')
      is_published = models.BooleanField(default=True, verbose_name='Публично')
      list_date = models.DateTimeField(default=datetime.now, blank=True, verbose_name='Дата публикации')
  
      def __str__(self):
          return self.title
  </code></pre>
  
  <p>forms.py</p>
  
  <pre><code>class ListingForm(forms.ModelForm):
  
      class Meta:
          model = Listing
          exclude = ('realtor',)
  </code></pre>
  
  <p>When selecting a category, unnecessary fields are hidden, but the labels remain, and I cannot register a div that needs to be hidden completely, but what was hidden I looked at the page code in the browser:</p>
  
  <pre><code>&lt;div class="card-body"&gt;
  &lt;form method="POST" id="ListingForm" data-cities-url="{% url 'ajax_load_cities' %}" data-districts-url="{% url 'ajax_load_districts' %}" novalidate enctype="multipart/form-data"&gt;
     {% csrf_token %}
     {% bootstrap_form form %}
  &lt;input type="submit" value="Добавить" class="btn btn-secondary btn-block"&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Code in browser:</p>
  
  <pre><code>&lt;div class="form-group"&gt;&lt;label for="id_series"&gt;Серия&lt;/label&gt;&lt;select name="series" class="form-control" title="" id="id_series"&gt;
    &lt;option value="" selected&gt;---------&lt;/option&gt;
  
    &lt;option value="1"&gt;104&lt;/option&gt;
  
    &lt;option value="2"&gt;105&lt;/option&gt;
  
    &lt;option value="3"&gt;106&lt;/option&gt;
  
    &lt;option value="4"&gt;хрущ&lt;/option&gt;
  
    &lt;option value="5"&gt;инд&lt;/option&gt;
  
    &lt;option value="6"&gt;элит&lt;/option&gt;
  
    &lt;option value="7"&gt;стал&lt;/option&gt;
  
    &lt;option value="8"&gt;г/т&lt;/option&gt;
  
    &lt;option value="9"&gt;к/т&lt;/option&gt;
  
  &lt;/select&gt;&lt;/div&gt;
  &lt;div class="form-group"&gt;&lt;label for="id_rooms"&gt;Количество комнат&lt;/label&gt;&lt;input type="number" name="rooms" value="0" class="form-control" placeholder="Количество комнат" title="" id="id_rooms"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>js:</p>
  
  <pre><code>$('#id_category').change(function () {
            var optionSelected = $("option:selected", this);
            var valueSelected = $(this).val();
  
            if (valueSelected === '1') {
              $('#id_rooms').hide();
              $('#id_series').hide();            
            } else if (valueSelected === '2') {
              $('#id_rooms').hide();
              $('#id_series').hide();
            } else {
              $('#id_rooms').show();
              $('#id_series').show();
            }
          });
  </code></pre>