form: required field

106 views
Skip to first unread message

sfor...@gmail.com

unread,
Nov 2, 2007, 11:49:10 AM11/2/07
to Django users
how to know if a field is required on template side ?

Karen Tracey

unread,
Nov 2, 2007, 11:58:46 AM11/2/07
to django...@googlegroups.com
On 11/2/07, sfor...@gmail.com <sfor...@gmail.com> wrote:

how to know if a field is required on template side ?


Search this list for "required field" and one of the first hits is this recent thread:

http://groups.google.com/group/django-users/browse_thread/thread/7d52d52ce5945be6/36367d3195812b8d?lnk=gst&q=%22required+field%22#

Karen

sfor...@gmail.com

unread,
Nov 2, 2007, 12:17:29 PM11/2/07
to Django users
thank you !
the solution is:
{% for field in form %}
{% if field.field.required %}
blablabla
{% endif %}
{% endfor %}

On 2 nov, 16:58, "Karen Tracey" <kmtra...@gmail.com> wrote:


> On 11/2/07, sforne...@gmail.com <sforne...@gmail.com> wrote:
>
> > how to know if a field is required on template side ?
>
> Search this list for "required field" and one of the first hits is this
> recent thread:
>

> http://groups.google.com/group/django-users/browse_thread/thread/7d52...
>
> Karen

Reply all
Reply to author
Forward
0 new messages