AnaReis wrote:
> Hi!
> I have this form where I want to put red asterisks after each required
> field, but I can't find a way to do it...
> This is my template code:
>
> <form name="form1" id="form1" action="resultadd/" method="POST"
> onSubmit="return" >
> <table>
> {%for field in form%}
> <tr><td>{{field.label}}</td><td>{{field}}{%if something_goes_here
> %}<font color="red">*</font>{%endif%}</td></tr>
> {%endfor%}
> </table>
> <input type="submit" value="Submit">
> </form>
>
> M
You can try this
{% if field.required %}<font color="red">*</font> {% endif %}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---