[html-formfu] formfu object in TT / accesing single formfu
elements in TT
Benjamin Bellee
bellee at webit.de
Wed Feb 6 14:57:39 GMT 2008
thank you :)
my bad.
i'm now accesing single elements from inside my "main" template.
it looks like it does exactly what i want it to do.
cheers
benjamin
Am Mittwoch, den 06.02.2008, 11:12 +0000 schrieb Carl Franks:
> On 06/02/2008, Benjamin Bellee <bellee at webit.de> wrote:
> > well,
> >
> > i have another problem regarding the issue self.object.
> >
> > i need to acces (and render) single form elements, and i cant think of
> > any other way then self.getelement(..)
> > or anything similar.
> > but i guess to be able to do so there has to be an object.
> > is there any other way? or will there be an object someday?
>
> That conversation was specific to making changes in formfu's own templates.
>
> If you're wanting to grab elements and render them, you probably
> shouldn't be customising formfu's own templates to do that - but
> should be doing it within your own application's template files.
>
> If that's the case, you still have access to the original HTML::FormFu object.
> It's only convention to stringify it using [% form %], but you can
> actually call any object methods you want to.
>
> [% FOREACH field = form.get_fields %]
> [% field.render %]
> [% END %]
>
> See the files in "t/examples/" for some, uh, examples of that.
> You can browse them here:
> http://code.google.com/p/html-formfu/source/browse/trunk/HTML-FormFu/t/examples/
>
> Carl
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.rawmode.org
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>
More information about the HTML-FormFu
mailing list