Gossamer Forum
Home : Products : Links 2.0 : Customization :

Category selected

Quote Reply
Category selected
I have only 1 category, i want to get rid of

<SELECT NAME="Category" SIZE=1><OPTION>---<OPTION>my category</SELECT>

to have only:

<SELECT NAME="Category" SIZE=1><OPTION SELECTED>my category</SELECT>

so it will be modified everywhere (admin panel included) and the category will be selected.

I made various (obviously wrong) modif in my db_utils.pl under:

$output = qq|<SELECT NAME="$name" $mult SIZE=$size><OPTION>---|;

foreach $field (@fields) {

$values{$field} ?

($output .= "<OPTION SELECTED>$field\n") :

($output .= "<OPTION>$field");

}

$output .= "</SELECT>";

**and**

# Make a select list out of those names.

$output = qq|<SELECT NAME="$name"><OPTION>---|;

foreach $field (sort keys %selectfields) {

($field eq $value) ?

($output .= "<OPTION SELECTED>$field\n") :

($output .= "<OPTION>$field\n");

}

$output .= "</SELECT>\n";

return $output;

}

How should i modify the code to obtain the result I want?

Thanks


Quote Reply
Re: [wirefram] Category selected In reply to
Find this:
Code:
$output = qq|<SELECT NAME="$name" $mult SIZE=$size><OPTION>---|;

And remove the part marked in red.

--Philip
Links 2.0 moderator
Quote Reply
Re: [King Junko II] Category selected In reply to
Thanks!