[html-formfu] Accessing a specific form element value within TT?

Ronald J Kimball rkimball at pangeamedia.com
Mon Nov 21 20:26:42 GMT 2011


On Mon, Nov 21, 2011 at 3:05 PM, J. Bobby Lopez <bobby.lopez at gmail.com>wrot=
e:

> Simple question, not certain if there is a built-in way to do this.
>
> If for example I'm able to populate my TT template with a formfu
> object like this:
>
> [% form %]
>
>
> Is it possible to access a specific value from that form object from
> within TT?  For example:
>
> [% form %]
>
> Username is [% form.Username %] # for example..?
>
> I could just capture the name outside the template in a separate
> variable and push that to TT, but just curious if there's already a
> way to do with from within the TT template without adding another
> element to the TT hashref.
>

You call all the same methods on the FormFu object within the template that
you can call outside the template.

[% form.param_value('Username') %] might be what you are looking for in
this case.

Ronald
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/html-formfu/attachments/20111121/68=
b361ae/attachment.htm


More information about the HTML-FormFu mailing list