On Sep 27, 2006, at 10:18, Jeremiah Foster wrote:
Hello all,
First post to this list, but I have been lurking for a while.
I am using the CGI plugin to TT and am getting an array reference
when I
should be getting an HTML element.
Here is what I have written:
[% CGI.start_form %]
[% CGI.popup_menu( Name => 'show_words',
Values => [ 'Yes', 'No' ] ) %]
[% CGI.submit %]
[% CGI.end_form %]
And here is what I get:
<form method="post" action="/cgi-bin/auth/auth.cgi"
enctype="multipart/form-data">
<select name="show_words" tabindex="1">
<option value="Yes">Yes</option>
<option value="No">No</option>
</select>
<input type="submit" tabindex="2" name=".submit" />
ARRAY(0x86eb4a0)
I am getting that last line; "ARRAY(0x86eb4a0)" instead of the
expected </form> tag.
Am I doing something wrong here?
Thanks,
Jeremiah
Hi Jeremiah
iirc, TT always calls methods in list context. end_form looks like it
returns multiple
values in list context.
It's untested but you might try:
[% CGI.end_form.join('') %]
cheers
nic
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates