in reply to Hidden fields using CGI

You can use the -override parameter to force it to use the default value.

use strict; use warnings; use CGI qw/ :standard /; print hidden( -name => "foo", -default => "bar", ), "\n"; print hidden(-name => "baz", -default => "bab" , -override => 1), "\n" +; __DATA__ C:\test>perl cgi.pl foo=test baz=test <input type="hidden" name="foo" value="test" /> <input type="hidden" name="baz" value="bab" /> C:\test>perl cgi.pl <input type="hidden" name="foo" value="bar" /> <input type="hidden" name="baz" value="bab" />

___________
Eric Hodges

Replies are listed 'Best First'.
Re: Re: Hidden fields using CGI
by narse (Pilgrim) on Apr 12, 2004 at 16:48 UTC
    Ah, that does the trick, thank you. Now that I know the keyword, I see it all over the documentation.