Search code examples
cgipopupmenu

CGI combo Cant select the right value


my cgi popup menu only selects the first element of the array of values. This is the code for its creation :

$q->popup_menu({ 
-id=> 'id',                       
-name   => 'name',                      
-class  => 'comboClass',                      
-values => [@aArray1],                     
-labels => \%aArray2                    
 });      

Solution

  • Try to remove [] and to add \:

    -values => [@aArray1], 
    

    To

    -values => \@aArray1,