<?xml version="1.0" encoding="windows-1252"?>
<node id="456218" title="Re: HTML::Template recalling selected dropdown options" created="2005-05-11 23:01:25" updated="2005-07-28 12:22:28">
<type id="11">
note</type>
<author id="59531">
Hero Zzyzzx</author>
<data>
<field name="doctext">
&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;p&gt;The HTML form generation features of CGI will save your butt here, the popup_menu() method will remember the last selected value by default. The "sticky value" behavior is very cool.&lt;/p&gt;
&lt;code&gt;
my $menu=$q-&gt;popup_menu(
		    -name=&gt;"templates",
		    -id=&gt;"templates",
		    -values=&gt;["",23,36],
		    -labels=&gt;{""=&gt;"Select . . .",23=&gt;"Text One",36=&gt;"Text Two"}
		   );
&lt;/code&gt;
&lt;p&gt;You should also check out [cpan://CGI::FormBuilder], which can automate a whole slew of form generation stuff, and use HTML::Template for output control.&lt;/p&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-59531"&gt;
&lt;p align="right"&gt;&lt;font size=1 face="Verdana, San Serif"&gt;&lt;b&gt; -Any sufficiently advanced technology is&lt;br&gt; indistinguishable from doubletalk.&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p align="right"&gt;&lt;font size=1 face="Verdana, San Serif"&gt;&lt;a href="http://www.geekuprising.com"&gt;My Biz&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
456197</field>
<field name="parent_node">
456197</field>
</data>
</node>
