Hi Greg -- >Yes! Now, I got submit to not be sticky too, like this: > > $output .= $q->hidden(-name => 'rm', -default => 'mode2', -override => 1); > >The CGI docs don't document the use of -override to return to the >default value of the hidden name, rather than the previous one, >in the section about that method. It is only mentioned that >override applies for all the form elements somewhere else. > >The advice I need is about whether this is the right way to do >this.
Yes, using "-override=>1" is the correct way to override pre-existing values of a parameter when dynamically generating the hidden data via CGI.pm. Also, it is worth noting: If you are using a templating system, such as HTML::Template, it is even better to statically define your hidden data in the template, as opposed to dynamically generating it via $q->hidden(). In your mode_one.tmpl -- <form> <input type="hidden" name="rm" value="mode2"> <!-- Some dynamic content here --> </form> Since it is unlikely that a particular button will change its destination run-mode, statically defining it in a template is a very valid solution. This only applies if you are using HTML::Template, or a similar templating system (as you should be!). -Jesse- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
