My template is

    {% for field in form %}
    <p>
        {{ field.label_tag }}
        {{field}}
        <span class="help">{% if field.help_text
%}<dd>{{ field.help_text }}</dd>{% endif %}</span>
        <span class="error">{% if field.errors %}<dd
class="myerrors">{{ field.errors }}</dd>{% endif %}</span>
    </p>
    {% endfor %}

How can I check the name of the current field?

On Jan 22, 5:23 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> On 22-Jan-08, at 5:45 PM, shabda wrote:
>
> > I want to have the one of the field for my form have a specific css
> > class. But if I do something like,
> > widget = forms.TextInput(attrs = {'size':60, 'class':'main'}
> > The textInput, and not its associated label gets the class. How can I
> > specify the class for label?
>
> you can break down the form and do it inside the template
>
> --
>
> regards
> kghttp://lawgon.livejournal.comhttp://nrcfosshelpline.in/web/
> Foss Conference for the common man:http://registration.fossconf.in/web/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to