For the following it doesn´t make a difference - but I thank Paul for the lesson. In other cases it might be useful!!!
The boxes show up properly but I get an error when submitting the entry:
• kind kann nicht den Wert 'on on' speichern.
in english:
• kind cannot get the value 'on on'
Any idea what is wrong in the following code?
sub {
my $tags = GT::Template->tags;
my $e;
my %values = (
Produzent => ' Produzent:',
Handel => ' Handel:',
sonstige => ' sonstige:'
);
my $l = $tags->{kind} || '';
foreach my $k ( sort { lc($a) cmp lc($b) }keys %values ) {
my $is_selected = $l eq $k ?
qq|$values{$k} <input type=checkbox name="kind" value="$k" checked>| :
qq|$values{$k} <input type=checkbox name="kind">|;
qq|$values{$k} <input type=checkbox name="kind">|;
$e .= $is_selected;
}
return $e;
}
Lars
The boxes show up properly but I get an error when submitting the entry:
• kind kann nicht den Wert 'on on' speichern.
in english:
• kind cannot get the value 'on on'
Any idea what is wrong in the following code?
sub {
my $tags = GT::Template->tags;
my $e;
my %values = (
Produzent => ' Produzent:',
Handel => ' Handel:',
sonstige => ' sonstige:'
);
my $l = $tags->{kind} || '';
foreach my $k ( sort { lc($a) cmp lc($b) }keys %values ) {
my $is_selected = $l eq $k ?
qq|$values{$k} <input type=checkbox name="kind" value="$k" checked>| :
qq|$values{$k} <input type=checkbox name="kind">|;
qq|$values{$k} <input type=checkbox name="kind">|;
$e .= $is_selected;
}
return $e;
}
Lars