[Templates] creating dynamic hidden fields in templates
Mark Mills
mark@xodiax.com
Wed, 6 Mar 2002 14:07:02 -0500
> > [% cgi.hidden( Name =3D> 'section' ).list.join %]
You know, rather than do the above, which irked me, I did the following:
$Template::Stash::SCALAR_OPS->{ join } =3D sub { return shift; };
Which adds a nice join method to the scalar and thus saved my sanity. =
=3D)
Maybe you'll like that more? It returns a proper undef when the scalar =
is undef, rather than an empty list being passed to join so that may =
help CGI avoid your empty hidden field issue.
Worth trying anyway. =3D)
--mark