Hi, FormBuild forms aren't really designed for you to do that. If you want to add extra methods you should so so to either the Fields or Layout classes you set the form up with and then access them via the form.field.test() if the test method produces a field or form.layout.test() if it is for a layout.
HTH, James C. Handel wrote: > Maybe I'm braindead, but what's broken with this: > > from formbuild.form import FormBase > from formbuild.builder.field.basic import HtmlFields > from formbuild.builder.layout.basic import HtmlLayout > > class MForm(FormBase): > field = HtmlFields() > layout = HtmlLayout() > def test(self): > print "test" > > t = MForm() > t.test() > > > > Traceback (most recent call last): > File "test.py", line 11, in ? > t = MForm() > File "/usr/lib/python2.4/site-packages/FormBuild-0.1.6b-py2.4.egg/ > formbuild/form/__init__.py", line 56, in __init__ > getattr(self, attribute)(self) > TypeError: test() takes exactly 1 argument (2 given) > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
