Customizing newforms

You like newforms but are a little bit uncertain how to style your forms using CSS with form.as_ul? Well, if you want more CSS classes to style upon, here a simple way on how to get them the easy way.

This mini-tutorial will show you how to add CSS classes to the help text and position the errorlist differently for fields in a newform-Form rendered with as_p() (although this also should apply to all the other rendering methods).

Hi, is there a demo of these styles somewhere? Thanks

Smaaz on June 10, 2007 at 14:17 +0200

Hi :)

Nope, not yet. What kind of demo would you like to see?

Basically this is part of my on-going effort to re-implement this site using Django and so I also use this technique for zerokspot v5, which will hopefully go live somewhen at the end of June or during the first days of July.

zerok on June 10, 2007 at 14:37 +0200

Comment on this

You can use Markdown here.

Please answer the question in this field. It should help keeping spambots out ;-)