Hi, {{ fields }} is rendered by the as_widget() method of the BoundField class.
Jorge On Feb 15, 2008 8:58 PM, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > > > > On Feb 14, 4:15 am, shabda <[EMAIL PROTECTED]> wrote: > > When using newforms, I want to get the id set on the input field. > > I am doing something like, > > {% for field in form %} > > {{ field }} > > ... > > > > Now this {{field}} will render as something like, > > <input id="id_name" type="text" name="name" maxlength="200" /> > > > > > > Withing the template how can I access the value for id. If this is not > > possible where in code does Django set the value for id? > > Try {{ field.auto_id }} > > > > > -- ------------------------------- Jorge Sousa --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---