Hi, i want to exclude certain category in the dropdown menu of add.cgi
i added a column to category called isHidden ( wen set to yes, the category in hidden)
the i modified this global:
sub {
my $catid = shift;
my $table = $DB->table('Category');
my $return_cats;
$table->select_options ('ORDER BY Full_Name ASC');
my $cond = GT::SQL::Condition->new('isHidden','=','No');
my $sth = $table->select( $cond );
while (my $hit = $sth->fetchrow_hashref) {
$return_cats .= "<option value=\"" . $hit->{ID} . "\"";
if ($catid == $hit->{ID}) { $return_cats .= "selected=\"selected\""; }
$return_cats .= ">" . $hit->{Full_Name} . "</option>";
}
return $return_cats;
}
is works, as far as excluding categorys, but the results are in a continuous line and not in a dropdown format
i want it in a dropdown format
please help
i added a column to category called isHidden ( wen set to yes, the category in hidden)
the i modified this global:
sub {
my $catid = shift;
my $table = $DB->table('Category');
my $return_cats;
$table->select_options ('ORDER BY Full_Name ASC');
my $cond = GT::SQL::Condition->new('isHidden','=','No');
my $sth = $table->select( $cond );
while (my $hit = $sth->fetchrow_hashref) {
$return_cats .= "<option value=\"" . $hit->{ID} . "\"";
if ($catid == $hit->{ID}) { $return_cats .= "selected=\"selected\""; }
$return_cats .= ">" . $hit->{Full_Name} . "</option>";
}
return $return_cats;
}
is works, as far as excluding categorys, but the results are in a continuous line and not in a dropdown format
i want it in a dropdown format
please help