Hi,
I'm using TTK with the CGI::Application plugin, and am having trouble
changing run modes via the hidden field method.
I have a template 'edit_estimate.tt2" containing two forms.
One form, with action "client_admin.cgi", consists of some input fields,
a submit button, and a hidden field called "rm" with a value of
"confirm" -- the idea is that it should process the input and tell the
user it's been processed.. The hidden field gets put into the template thus:
[% cgi.hidden(name=>"rm", value=>"confirm") %]
The second form, processed after the first, contains a pop-up menu for
selecting and loading a different item to edit. It also contains a
hidden field with inserted via:
[% cgi.hidden(name=>"rm", value=>"edit_est") %]
.
If I submit the second form, it reloads the page correctly, except that
it prints first form's hidden field with the wrong value -- the one that
was submitted via javascript , "edit_est" instead of "confirm". It seems
to be ignoring what the template is telling it to do.
I can correct this annoying behavior by not using the cgi plugin -- i.e.
<input name="rm" type="hidden" value="confirm" />
But I'd like to try to understand what's going on here.
Thx
Bruce
--
Bruce McKenzie
Business Information Graphics
242 West 36th Street
10th Floor
New York, NY 10018
212-477-4288
http://2MinuteExplainer.com
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates