Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 72388

Form Fields Not Fitting Bootstrap Modal

$
0
0

I am trying to implement a bootstrap modal form in my Django project. When I do this, everything works except the fields are running much wider than the modal window and seem strangely offset. I feel like there's an easy fix here but I can't determine exactly what I'm doing wrong. Here is my html for the modal form:

modal.html

<form method="post" action="">
  {% csrf_token %}

 <div class="modal-header">
    <h5 class="modal-title">Create new Book</h5>
    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
      <span aria-hidden="true">&times;</span>
    </button>
  </div>

  <div class="modal-body">
    {{form.Reference_Number|as_crispy_field}}
    {{form.Ultimate_Consignee|as_crispy_field}}
  </div>

  <div class="modal-footer">
    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
    <button type="button" class="submit-btn btn btn-primary">Create</button>
  </div>

</form>

enter image description here


Viewing all articles
Browse latest Browse all 72388

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>