Code:
sub { my $tags = GT::Template->tags;
my $e;
my %countries = (
DE_Germany => 'DE: Germany',
UK_United_Kingdom => 'UK: United Kingdom'
);
my $l = $tags->{Location} || '';
foreach my $k ( sort keys %countries ) {
my $is_selected = $l eq $k ?
qq|$countries{$k} <input type=checkbox name="Location" value="$k" checked>| :
qq|$countries{$k} <input type=checkbox name="Location">|;
$e .= $is_selected;
}
return $e;
}
Well, not tested, but theoritically this should display the country list, with checkboxes near names.
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...