2👍
✅
Django forms aren’t responsible for outputting the form element itself. So there is nothing to be done at the form declaration level.
You can always pass an attribute from the view and use it in your template:
<form id="{{ form_id_from_view }}" action="." method="POST">
0👍
You can directly assign the id
to the form element in your template.
<form id="my_id" name="some_name" action="/my/url/" method="POST">
- [Answered ]-JQuery not working after ajax call, even though I'm using the correct on() method
- [Answered ]-Django Does Not Write Logs to File
- [Answered ]-Django-summernote : How can I make it work based on model form?
- [Answered ]-How to resize an image in Python without using Pillow
- [Answered ]-How to get parent object in multi table inheritance in django
Source:stackexchange.com