#Inserting a form into prebuilt HTML

5 messages · Page 1 of 1 (latest)

spring oracle
#

Hello,

I am using a html/css template for my django template. Included in the template is a very nice contact form, and I would like to insert my contact form into it, how could I go about that?

I saw that you can widgets, but this seems to be more for stylizing it from the beginning, rather than in the css/html.

Here is the html, form and view! Thanks

HTML:
https://pastebin.com/tTMJZDUA

View:
https://pastebin.com/izM8rTpW

Form:
class ContactForm(forms.Form):
name = forms.CharField(required=True)
email = forms.CharField(required=True)
subject = forms.CharField(required=True)
message = forms.CharField(required=True)

glass cypress
#

What exactly is it you have trouble with? Your text is a bit uspesific 🤔

spring oracle
#

Basically, I am trying to figure out a way to kind of "break up" the form into seperate parts, so that I can input the form into the html rather than just using {{form}}, because if I use that it looks very html-like

glass cypress
#

Uh, you know you can render fields in a form by themselves? Or not render then at all, just render their names/values/errors? 🤔