On Fri, 2007-03-02 at 15:27 +1100, Michael Lake wrote: > Hi all > > I see in the documentation for forms that the HTML output will include the > validation > errors as a <ul> near the field. How does one change that? I would like the > errors to > be after the form field similar to this below irrespective of whether im > rendering it > as_p or asdefault table layout. > > Name: [ ] < This field is required > > rather than > > * This field is required > Name: [ ]
Have a look at the errors_on_separate_row parameter in the html_output() method of the newsforms.form.Form class. Passing that in as True should do what you want. It means you will need to write your own version of as_ul() or as_table() if you want to use those methods, but they're only convenience methods in any case -- overriding or using your own wrapper is encouraged for anything funky. So either call html_output() and pass in your format strings manually, with a trailing True parameter, or write your own wrapper for this in your Form subclass. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---