#!/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."
";
#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
\n";
my @temp_array=keys %hash;
foreach my $temp_todo (@temp_array)
{
print "".$temp_todo." upload
\n";
}
};
print $cgi_instance->end_html;