title: How to send data to view from form after asking for confirmation?
body: <p>I created a simple form where I'm asking for user input and then posting that to the database. Now I would like the user to confirm the data in form is correct, and for that I'm using a <code>Bootstrap modal</code>.</p>
  
  <p>How can I send the data from the form to the view when pressing the <code>'OK' button</code> on the modal.</p>
  
  <p>I'm new to the <code>Django framework</code>, and maybe there is another better way without using bootstrap modals.</p>
  
  <p>Form:</p>
  
  <pre><code>class ReportForm(forms.Form):
      report_title = forms.ChoiceField(choices=get_report_titles())
      report_link = forms.CharField(widget=forms.Textarea, required=False)
  </code></pre>
  
  <p>Html file:</p>
  
  <pre><code>&lt;form class="w-100" action="" method="post"&gt;
      {% csrf_token %}
      &lt;label class="pl-0 mt-auto mr-2"&gt;Report&amp;nbsp;Name&lt;/label&gt;
      &lt;select name="report_title" class="form-control report-name"&gt;
          &lt;option selected&gt;Select report&lt;/option&gt;
          {% for name in report_names %}
          &lt;option&gt;{{ name }}&lt;/option&gt;
          {% endfor %}
      &lt;/select&gt;
      &lt;div class="my-1 col-lg-12 float-left pl-0"&gt;
          &lt;label&gt;Report Link&lt;/label&gt;
          &lt;input class="form-control bg-white" type="text" id="report" name="report_link"&gt;
      &lt;/div&gt;
      &lt;input id="confirm" value="Save" type="button" data-toggle="modal" data-target="#exampleModalCenter" class="btn btn-outline-success" /&gt;
  &lt;/form&gt;
  
  &lt;!-- Modal --&gt;
  &lt;div class=" modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true"&gt;
      &lt;div class="modal-dialog modal-dialog-centered" role="document"&gt;
          &lt;div class="modal-content"&gt;
              &lt;div class="modal-header"&gt;
                  &lt;h5 class="modal-title" id="exampleModalLongTitle"&gt;Confirmation&lt;/h5&gt;
                  &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;
                      &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;
                  &lt;/button&gt;
              &lt;/div&gt;
              &lt;div class="modal-body"&gt;
                  Make sure you have the right title and link.
              &lt;/div&gt;
              &lt;div class="modal-footer"&gt;
                  &lt;button type="button" class="btn btn-secondary" data-dismiss="modal"&gt;Close&lt;/button&gt;
                  &lt;button type="button" class="btn btn-primary"&gt;Save&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>def report_view(request):
          if request.method == 'POST':
              form = ReportForm(request.POST)
          if form.is_valid():
                  report_title = form.cleaned_data['report_title']
                  report_link = form.cleaned_data['report_link']
                  new_report = Report(title = report_title, link = report_link)
                  new_report.save()
  </code></pre>