Saturday, July 24, 2010

Re: working with model fields

On 07/24/10 03:47, shwetanka wrote:
> On Jul 24, 12:39 pm, Masklinn<maskl...@masklinn.net> wrote:
>>>> hey guys, im making a form, and im having a problem with
>>>> the models.TextField() , when used it displays the text
>>>> field correctly, but it allows for the text field to be
>>>> stretched, is there a way to set a maximun width and
>>>> height for it ?
>>
>>> yes - use attrs
>>
>> Is that going to work if he's talking about webkit's
>> resizing of textareas?
>
> yes with attrs you can set widget's html attributes. :)

I think as Masklinn notes, Webkit-based browsers (and FF3.7
should too) have resizing by default, where older versions of FF
can install the Resizable Textarea plugin[1]. You can set the
attributes, but that doesn't prevent the user-agent from giving
the user the ability to resize the control. The attributes just
become a hint for initial rendering. If you found a way to
disable my ability to resize text fields, I'd stop visiting your
site pretty quickly...


-tim

[1]
https://addons.mozilla.org/en-US/firefox/addon/3818/

--
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 django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment