in reply to Re^3: perl + cgi - onclick generation problem
in thread perl + cgi - onclick generation problem

I simply ran out of idea and cannot proceed further
This is the code snippet what I had tried and it never works the way as expected
sub hidden_field { my $counter = $cgi->param('field_1'); if ( not defined $counter ) { $counter = 1; } else { $counter++; } print $cgi->hidden('field_1', $counter); return $counter; } my $count = hidden_field; foreach ( 1 .. $count ) { #here is a seperate function that generates set of 3 text_area }
Any pointers please?

Replies are listed 'Best First'.
Re^5: perl + cgi - onclick generation problem
by matrixmadhan (Beadle) on Dec 12, 2008 at 11:07 UTC
    I got it :)
    print $cgi->hidden( -name => $field_name, -default => $field_data, -override => 1 );
    This is what I want and its working now as expected.
    Thanks for all the help offered :)