I have created an HTML form that looks like this:
<form class="well span9 offset1" action="/summary/" method="post">
{% csrf_token %}
<fieldset>
<label class="control-label" for ="inputIcon">Type or paste your text into box:</label>
</fieldset>
<div class="controls">
<div class="input-prepend">
<textarea rows="15" class="span9"></textarea>
</div>
</div>
<fieldset>
<input type="checkbox" name="input_text" />
Send me the copy of summary by e-mail.
</fieldset><br />
<a href="#summaryModal" data-toggle="modal"><button type="submit" class="btn btn-primary offset3">Summarize</button></a>
<button type="reset" class="btn btn-danger">Reset</button>
</form>
When a user submits the form, I want it to process in the summary function and return the result to a function in a Bootstrap modal. However, instead of going to the function, the form just opens the modal popup. I am trying to return to the same template from the function with the result. Do I need to use Ajax for this?