You might add a new global which returns a select tag (or any HTMLs) like the example below:
my $tags = shift;
my $table = $DB->table('contacts');
my $sth = $table->select (['Column1', 'Column2']);
my $output = '<select name=select_name multiple>';
while (my $row = $sth->fetchrow_hashref) {
$output .= '<option value='.$row->{Column1}.'>'.$row->{Column2}.'</option>';
}
$output .= '</select>';
return $output;
}
Code:
sub { my $tags = shift;
my $table = $DB->table('contacts');
my $sth = $table->select (['Column1', 'Column2']);
my $output = '<select name=select_name multiple>';
while (my $row = $sth->fetchrow_hashref) {
$output .= '<option value='.$row->{Column1}.'>'.$row->{Column2}.'</option>';
}
$output .= '</select>';
return $output;
}