# Rendering Form Fields

**URL:** <https://forum.djangoproject.com/t/rendering-form-fields/16641>\
**Category:** Templates & Frontend\
**Created:** [October 25, 2022, 12:41pm UTC](https://forum.djangoproject.com/t/rendering-form-fields/16641 "2022-10-25T12:41:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AhmdMWddh](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/ahmdmwddh/32/21707_2.png) [@AhmdMWddh](https://forum.djangoproject.com/u/AhmdMWddh)\
**Post date:** [October 25, 2022, 12:41pm UTC](https://forum.djangoproject.com/t/rendering-form-fields/16641/1 "2022-10-25T12:41:11Z")

</div>

What is the Difference between this renderings

1. {{ form.mobile }}
2. {% render\_field form.mobile %}

and is this usage valid:

{% render\_field form.mobile **`required`** %}

---

<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:** [October 25, 2022, 1:14pm UTC](https://forum.djangoproject.com/t/rendering-form-fields/16641/2 "2022-10-25T13:14:31Z")

</div>

There is no django-provided template tag called `render_field`.

You would need to check with whatever package you’re using that is providing it to determine how it may be different from directly rendering the field.

---

<div class="post-metadata">

**Author:** ![AhmdMWddh](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/ahmdmwddh/32/21707_2.png) [@AhmdMWddh](https://forum.djangoproject.com/u/AhmdMWddh)\
**Post date:** [October 25, 2022, 6:06pm UTC](https://forum.djangoproject.com/t/rendering-form-fields/16641/3 "2022-10-25T18:06:16Z")

</div>

thank you for reply.

---

<div class="post-metadata">

**Author:** ![AhmdMWddh](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/ahmdmwddh/32/21707_2.png) [@AhmdMWddh](https://forum.djangoproject.com/u/AhmdMWddh)\
**Post date:** [October 25, 2022, 6:10pm UTC](https://forum.djangoproject.com/t/rendering-form-fields/16641/4 "2022-10-25T18:10:26Z")

</div>

> [@AhmdMWddh](#):
>
> {% render\_field form.mobile %}

tag provided by package `django-widget-tweaks` to render forms fields.

> [@AhmdMWddh](#):
>
> {% render\_field form.mobile **`required`** %}

it works so fine to pass html attributes into rendered input.  
as example we can do something like this.

{% render\_field form.mobile **`class="btn btn-danger"`**  **`required`** %}
