in reply to FormBuilder

here is a suggestion how to solve your problem adressing the CGI::FormBuilder issues. you don't need the "variable variables" - use hashes and references instead. (Why it's stupid to `use a variable as a variable name')

#!/usr/bin/perl use CGI; use strict; use warnings; use CGI::FormBuilder; # your scripname goes here my $self="form-test.cgi"; my %hash = ( video => "format director producer acter", audio => "album song", picture => "photographer style size", ); my $cgi_instance=new CGI; print $cgi_instance->header; my $approved_todo=$cgi_instance->CGI::param('todo'); if (defined($approved_todo)) { #going inside here if $act is defined print "you selected ".$approved_todo."<br>"; #your complete CGI::FormBuilder Code goes here my @all = $hash{$approved_todo}; my $form1=CGI::FormBuilder->new( fields=> \@all, # and so on with your FormBuilder Code } else { #go inside here if $act not defined print "choose your way of uploading<br>\n"; my @temp_array=keys %hash; foreach my $temp_todo (@temp_array) { print "<a href=\"".$self."?todo=".$temp_todo."\" act=1>".$temp_tod +o." upload</a><br>\n"; } }; print $cgi_instance->end_html;

Replies are listed 'Best First'.
Re: Re: FormBuilder - here is some working code
by ile (Initiate) on Sep 23, 2003 at 07:35 UTC
    Thanx a lot!
    this is really helpfull
    i thought nobody will answer :)
    thanx!
    ile