Home : Products : Links 2.0 : Customization :

Products: Links 2.0: Customization: Re: [asmith] How to change category display on add.html?: Edit Log

Here is the list of edits for this post
Re: [asmith] How to change category display on add.html?
  
In Reply To:
Hello,

I am wanting to make one more modification to this category addition. When someone clicks add to the directory while in a specific category, I am wanting the original pull down list to appear however I would like the category they were in to be selected.

<option selected>Category / Sub Cat</option>

I am not sure how to add the selected part to the build_select_field incat variables. Any help would be appreciated!

Best,

- Andy

Hi Andy

It's quitte easy to do that :

Replace the red part

if ($db_single_category == 1, $incat){
my $c_clean = &build_clean($incat);
$category = qq~$category <input type="hidden" name="category" size="10" value="$incat">$c_clean~;
}
else {
$category = &build_select_field ("Category", "$in{'category'}");
}

in to

if ($db_single_category == 1, $incat){
my $c_clean = &build_clean($incat);
$category = &build_select_field ("Category", $incat);
}
else {
$category = &build_select_field ("Category", "$in{'category'}");
}

Cheers

Athair

Last edited by:

athair: Apr 15, 2004, 2:10 AM

Edit Log: