u must specify form field attributes in the widget argument
such as :
username =
CharField(max_length=20,widget=TextInput(attr={"background-color:red"....any
another attributes u wanna set this }

check this document out
http://docs.djangoproject.com/en/dev/ref/forms/widgets/

On Fri, Nov 12, 2010 at 8:50 PM, hemi19 <hema519chan...@gmail.com> wrote:

>
> Hi All,
>
> iam registration form in my website and iam able to get all the values i
> needed from DB using forms.My problem is how can i change color and size of
> textbox. The below is my code
>
> {% for field in form %}
> <tr>
>    <td width=250>{{ field.label_tag }}</td><td  Valign="left"
> style="background-color:CCCCCC">{{ field }}</td>
>    {% if field.help_text %}<td width=500>{{ field.help_text }}</td>{% endif
> %}
>    {% if field.errors %}<td class="myerrors" width=400>{{ field.errors
> }}</td>{% endif %}
>    </tr>
> {% endfor %}
> --
> View this message in context:
> http://old.nabble.com/how-to-set-color-for-field-in-forms-tp30199030p30199030.html
> Sent from the django-users mailing list archive at Nabble.com.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to