in html page action is not added i wanted to know how i can submit the form without adding action attribute??
CodePudding user response:
simply add your submit in the form tag:
<form method="post">
{% csrf_token %}
{{form.as_p}}
<input type="submit" value="submit" />
</form>
and if you don't want that, so use form= in submit:
<form method="post" id="this_form">
{% csrf_token %}
{{form.as_p}}
</form>
<input type="submit" form="this_form" value="submit" />