# Making a list of form fields with a for loop?

**URL:** <https://forum.djangoproject.com/t/making-a-list-of-form-fields-with-a-for-loop/8903>\
**Category:** Using Django\
**Created:** [July 22, 2021, 6:52am UTC](https://forum.djangoproject.com/t/making-a-list-of-form-fields-with-a-for-loop/8903 "2021-07-22T06:52:19Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [July 22, 2021, 12:44pm UTC](https://forum.djangoproject.com/t/making-a-list-of-form-fields-with-a-for-loop/8903/3 "2021-07-22T12:44:24Z")

</div>

In addition to the prior answer, you can also access the form fields attributes directly in the ` __init__ ` method of the class and add the fields there.

While it’s not a precise match, [this earlier topic](https://forum.djangoproject.com/t/dynamically-add-a-field-to-a-model-form/3451) addressed a corresponding idea with the admin.

---

_[View the full topic](https://forum.djangoproject.com/t/making-a-list-of-form-fields-with-a-for-loop/8903)._
