How much customization can you do with djangoforms.ModelForm?
Posted
by Randell
on Stack Overflow
See other posts from Stack Overflow
or by Randell
Published on 2010-03-18T02:53:45Z
Indexed on
2010/03/18
3:01 UTC
Read the original article
Hit count: 834
I've just started playing with The Django Form Validation Framework on Google App Engine (from google.appengine.ext.db import djangoforms
) and I got stuck googling how to customize forms using it. I was wondering whether the following are possible using the package:
- Add help texts beside/below input/select fields and textareas (e.g. "This field is required", "Example: qwerty123")
- Add/modify attributes for the input/select fields and textareas (e.g. adding the following attributes: class, id, name, maxlength, minlength, etc.)
- Add custom validations like checking whether a particular field should be unique or checking a value against a regular expression
- Modify the error messages
- Add another column to the table generated by the form
Also note that djangoforms.ModelForm
is different from django.forms.Form
.
© Stack Overflow or respective owner