Thank you for that code! Works great, and wouldnt have been able to fiddle it out like this by myself :/. Would really be great if this would be easier.
On Jul 13, 12:56 am, Justin Davis <[EMAIL PROTECTED]> wrote: > I realize this probably isn't the solution that you're looking for, > but I when I want a different form look (for instance having the form > label be a block element, instead of 'inline' like how the table > forces), I just create a subclass of the form. For example: > > from web import form > > class LiForm(form.Form): > def render(self): > out = '<ul class="li_form">' > out += self.rendernote(self.note) > for i in self.inputs: > out += ' <li><label for="%s">%s</label>' % (i.id, > i.description) > out += '<span id="note_%s">%s</span></li>\n' % (i.id, > self.rendernote(i.note)) > out += '<li>'+i.pre+i.render()+i.post +'</li>' > out += "</ul>" > return out > > It would be cool if we could support different form renderings > natively -- django does this as methods on the form instance -- but > this works for now. > > Cheers, > Justin > > On Jul 12, 11:56 am, Eric Talevich <[EMAIL PROTECTED]> wrote: > > > Looks like Greg even submitted the code for > > it:http://groups.google.com/group/webpy/msg/04b6ba1d4313a143 > > > I don't see this issue mentioned in the bug tracker or blueprints, > > though. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
