Scoop Box Exchange - Show Box: sections_select 1.00
|
Description:
Creates a select box of all sections. It will also select the proper option for which section the user is in.
Box Code:
my $content;
$content = "<SELECT name=\"section\">\n";
foreach ( keys %{$S->{SECTION_DATA}} ) {
my $section = $S->{CGI}->param('section');
$content .= "<option value=\"${$S->{SECTION_DATA}}{$_}->{section}\"";
if(${$S->{SECTION_DATA}}{$_}->{section} eq $section) { $content .= " selected" };
$content .= ">";
$content .= ${$S->{SECTION_DATA}}{$_}->{title};
$content .= "<\/option>\n";
}
$content .= "<\/SELECT>\n";
return $content;
|
|
|