Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [calliope] Global for ENUM-field (checkboxes)

Quote Reply
Re: [calliope] Global for ENUM-field (checkboxes) In reply to
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...
Subject Author Views Date
Thread Global for ENUM-field (checkboxes) calliope 9162 May 6, 2003, 6:59 AM
Thread Re: [calliope] Global for ENUM-field (checkboxes)
webmaster33 8954 May 7, 2003, 6:30 AM
Thread Re: [webmaster33] Global for ENUM-field (checkboxes)
Paul 8918 May 7, 2003, 7:06 AM
Thread Re: [Paul] Global for ENUM-field (checkboxes)
webmaster33 8892 May 7, 2003, 7:13 AM
Thread Re: [webmaster33] Global for ENUM-field (checkboxes)
Paul 8897 May 7, 2003, 7:57 AM
Thread Re: [Paul] Global for ENUM-field (checkboxes)
webmaster33 8929 May 7, 2003, 8:05 AM
Post Post deleted by calliope
calliope 8843 May 7, 2003, 8:28 AM
Post Re: [webmaster33] Global for ENUM-field (checkboxes)
calliope 8901 May 7, 2003, 8:34 AM
Thread Re: [webmaster33] Global for ENUM-field (checkboxes)
Paul 8918 May 7, 2003, 8:36 AM
Thread Re: [Paul] Global for ENUM-field (checkboxes)
calliope 8907 May 7, 2003, 9:59 AM
Thread Re: [calliope] Global for ENUM-field (checkboxes)
webmaster33 8847 May 7, 2003, 2:07 PM
Thread Re: [webmaster33] Global for ENUM-field (checkboxes)
Aki 8885 May 8, 2003, 11:21 AM
Thread Re: [Aki] Global for ENUM-field (checkboxes)
webmaster33 8881 May 8, 2003, 3:02 PM
Thread Re: [webmaster33] Global for ENUM-field (checkboxes)
calliope 8807 May 8, 2003, 11:39 PM
Thread Re: [calliope] Global for ENUM-field (checkboxes)
jaltuve 8845 May 9, 2003, 10:38 AM
Thread Re: [jaltuve] Global for ENUM-field (checkboxes)
cwschroeder 8534 Jan 7, 2008, 5:30 AM
Post Re: [cwschroeder] Global for ENUM-field (checkboxes)
Andy 8554 Jan 7, 2008, 6:44 AM
Post Re: [Aki] Global for ENUM-field (checkboxes)
jaltuve 8783 May 9, 2003, 10:46 AM
Post Re: [calliope] Global for ENUM-field (checkboxes)
Paul 8825 May 7, 2003, 3:02 PM