Hi Andreas, On Mar 17, 11:02 pm, Andreas Ahlenstorf <[EMAIL PROTECTED]> wrote:
> Setting a field asrequireddoesn't give me a 'required' class or > something like that when using the built-in functions for form > rendering (like as_p()). Passing an additional attribute to the > widget works only with the field itself. So, what does I need to do > get a custom class on all labels of myrequiredfields? OK I also started worrying about it today because one of my customers asked me to add asterisks to the required fields. I told I have a trouble with it (hacking around _html_output will not help since its already too big function which seems needs a refactoring. Instead I have made decision to move all my forms to direct rendering via template. Results were astonishing since it uses less code and seems to be much flexible then core technique. So since today I am moving all my forms to use TemplatedForm. I have explained the technique with example code here: http://code.djangoproject.com/wiki/TemplatedForm Please feel free to use it. Regards, Alex --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---