I am trying to create a contact form using flask but keep getting this error when the page is rendered.
\'forms.ContactForm object\' has no attribute \'hidden_
The error that you're seeing is telling you that forms.ContactForm
has no method called "hidden_tag". You're referencing that method on the 6th line of contact.html
like this:
{{ form.hidden_tag() }}
According to the flask documentation, this is the correct way to implement CSRF protection.
I would start by removing the line that references "form.hidden_tag()", then see if your form works. Then go back and implement CSRF protection per those instructions from the documentation.