If you want to preserve the user parameters in the HTML you don't need to specify -value => 'fake', as CGI will automatically fetch the value for the field.#!/usr/bin/perl use strict; use warnings; use CGI; use Data::Dumper; my $cgi = CGI->new; print "Content-type: text/plain\n\n"; print $cgi->textfield( -name => 'BillName', -value => 'fake', -override => 1, -maxlength => 70, -size => 50, );
However, if multiple values are sent for the same name, then CGI::param() will return the list of values, which has a similar effect as my previous post.print $cgi->textfield( -name => 'BillName', -value => $cgi->param('BillName'), -maxlength => 70, -size => 50, ); print $cgi->textfield( -name => 'BillName', -maxlength => 70, -size => 50, );
In reply to Re: Problem with data fields duplicating in reentrant CGI form
by imp
in thread Problem with data fields duplicating in reentrant CGI form
by Popcorn Dave
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |