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

J. Bobby Lopez jbl at jbldata.com
Mon Nov 21 22:37:43 GMT 2011


Thanks guys,

[% form._get_field('Username').value() %] # is correct

I was about to [% USE CGI %] and [% CGI.params('Username') %], but
this is much better (one less module to load).

Thanks again.
-Bobby

On Mon, Nov 21, 2011 at 4:03 PM, Rippl, Steve
<rippls at woodlandschools.org> wrote:
> Sorry, I mean  [% form.get_field('Username').value() -%] or something like
> that!!
>
> On Mon, Nov 21, 2011 at 12:56 PM, Rippl, Steve <rippls at woodlandschools.org>
> wrote:
>>
>> You mean [% form.get_field('Username') -%] ?
>>
>> On Mon, Nov 21, 2011 at 12:05 PM, J. Bobby Lopez <bobby.lopez at gmail.com>
>> wrote:
>>>
>>> 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.
>>>
>>> Thanks,
>>> -Bobby
>>>
>>> _______________________________________________
>>> HTML-FormFu mailing list
>>> HTML-FormFu at lists.scsys.co.uk
>>> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>>
>>
>>
>> --
>> Steve Rippl
>> Technology Director
>> Woodland Public Schools
>> 360 841 2730
>
>
>
> --
> Steve Rippl
> Technology Director
> Woodland Public Schools
> 360 841 2730
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>



More information about the HTML-FormFu mailing list