Lines 106-112
sub _get_chunk {
Link Here
|
106 |
keys %{ $options{'choices'} } |
106 |
keys %{ $options{'choices'} } |
107 |
]; |
107 |
]; |
108 |
} elsif ( $options{'multiple'} ) { |
108 |
} elsif ( $options{'multiple'} ) { |
109 |
my @values = split /,/, $value; |
109 |
my @values; |
|
|
110 |
@values = split /,/, $value if defined($value); |
110 |
$chunk->{type} = 'multiple'; |
111 |
$chunk->{type} = 'multiple'; |
111 |
$chunk->{CHOICES} = [ |
112 |
$chunk->{CHOICES} = [ |
112 |
sort { $a->{'text'} cmp $b->{'text'} } |
113 |
sort { $a->{'text'} cmp $b->{'text'} } |
Lines 115-121
sub _get_chunk {
Link Here
|
115 |
{ |
116 |
{ |
116 |
text => $options{multiple}->{$option_value}, |
117 |
text => $options{multiple}->{$option_value}, |
117 |
value => $option_value, |
118 |
value => $option_value, |
118 |
selected => grep /^$option_value$/, @values, |
119 |
selected => (grep /^$option_value$/, @values) ? 1 : 0, |
119 |
} |
120 |
} |
120 |
} |
121 |
} |
121 |
keys %{ $options{multiple} } |
122 |
keys %{ $options{multiple} } |
122 |
- |
|
|