# form\_class = forms.CharField AttributeError: 'function' object has no attribute 'CharField'

**URL:** <https://forum.djangoproject.com/t/form-class-forms-charfield-attributeerror-function-object-has-no-attribute-charfield/9690>\
**Category:** Using Django\
**Created:** [September 14, 2021, 6:53am UTC](https://forum.djangoproject.com/t/form-class-forms-charfield-attributeerror-function-object-has-no-attribute-charfield/9690 "2021-09-14T06:53:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![painvspain](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/painvspain/32/5799_2.png) [@painvspain](https://forum.djangoproject.com/u/painvspain)\
**Post date:** [September 14, 2021, 6:53am UTC](https://forum.djangoproject.com/t/form-class-forms-charfield-attributeerror-function-object-has-no-attribute-charfield/9690/1 "2021-09-14T06:53:46Z")

</div>

![image](https://us1.discourse-cdn.com/flex026/uploads/djangoproject/original/2X/6/69de67018f93a633ef4dd3b556075695d596356f.png)

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [September 14, 2021, 12:36pm UTC](https://forum.djangoproject.com/t/form-class-forms-charfield-attributeerror-function-object-has-no-attribute-charfield/9690/2 "2021-09-14T12:36:10Z")

</div>

Please do not post images or screenshots of code. (It’s not readable on all devices and it can’t be quoted or highlighted for further discussion.)  
Post the code itself and the error messages as text into the body of your message. (When doing so, enclose the block of code / text between lines of three backtick - ` characters. That means you’ll have a line of ```, then the text (or code), then another line of ```.

---

<div class="post-metadata">

**Author:** ![cloudlessdreams](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/cloudlessdreams/32/5805_2.png) [@cloudlessdreams](https://forum.djangoproject.com/u/cloudlessdreams)\
**Post date:** [September 14, 2021, 3:47pm UTC](https://forum.djangoproject.com/t/form-class-forms-charfield-attributeerror-function-object-has-no-attribute-charfield/9690/3 "2021-09-14T15:47:01Z")

</div>

Shoud it not be … forms.CharField(\*\*kwargs)

[https://docs.djangoproject.com/en/3.2/ref/forms/fields/](https://docs.djangoproject.com/en/3.2/ref/forms/fields/)
