As explained in this section of the documentation, you do not need to use the automatic form generation method ({{ form.as_p }}
) if you don’t want to. Just have the fields in your template input
correct (with the name
s appropriate to each field).
A way to find out what format is expected by a Form
specific is - in shell for example - call the method as_p
and see what your exit is:
>>> f = ContactForm(auto_id=True)
>>> print(f.as_p())
<p><label for="subject">Subject:</label> <input id="subject" type="text" name="subject" maxlength="100" /></p>
<p><label for="message">Message:</label> <input type="text" name="message" id="message" /></p>
<p><label for="sender">Sender:</label> <input type="email" name="sender" id="sender" /></p>
<p><label for="cc_myself">Cc myself:</label> <input type="checkbox" name="cc_myself" id="cc_myself" /></p>
Source
From there you can check if your manually created template is in accordance with what is expected by Form
, and if you are you can use it without problems.