Benedict Verheyen wrote:
> Hi,
>
> a have a charfield of 255 chars in a model but on the form, it
> consists of a smallish
> inputfield instead of a textarea.
> How can i increase the size of the form element?
>
>   
Change it via a manipulator.

Assume you have a model with a CharField::

class MyModel(models.Model):
myfield = models.CharField(maxlength=250)

You may create a manipulator and change parameter for individual
field as follows::

(in some view)
...
manipulator = MyModel.AddManipulator()
manipulator['myfield'].length = 200
...
form_data = request.POST.copy()
errors = manipulator.get_validation_errors(form_data)
...
form = forms.FormWrapper(manipulator, form_data, errors)


-- ymasuda

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to