version 1.25, 2003/05/08 19:52:43
|
version 1.26, 2003/05/08 20:10:49
|
Line 960 the result is stored in.
|
Line 960 the result is stored in.
|
<choices> takes an attribute "multichoice" which, if set to a true |
<choices> takes an attribute "multichoice" which, if set to a true |
value, will allow the user to select multiple choices. |
value, will allow the user to select multiple choices. |
|
|
|
<choices> takes an attribute "allowempty" which, if set to a true |
|
value, will allow the user to select none of the choices without raising |
|
an error message. |
|
|
B<SUB-TAGS> |
B<SUB-TAGS> |
|
|
<choices> can have the following subtags: |
<choices> can have the following subtags: |
Line 1049 sub start_choices {
|
Line 1053 sub start_choices {
|
$paramHash->{'variable'} = $token->[2]{'variable'} if (!defined($paramHash->{'variable'})); |
$paramHash->{'variable'} = $token->[2]{'variable'} if (!defined($paramHash->{'variable'})); |
$helper->declareVar($paramHash->{'variable'}); |
$helper->declareVar($paramHash->{'variable'}); |
$paramHash->{'multichoice'} = $token->[2]{'multichoice'}; |
$paramHash->{'multichoice'} = $token->[2]{'multichoice'}; |
|
$paramHash->{'allowempty'} = $token->[2]{'allowempty'}; |
$paramHash->{CHOICES} = []; |
$paramHash->{CHOICES} = []; |
return ''; |
return ''; |
} |
} |
Line 1193 sub postprocess {
|
Line 1198 sub postprocess {
|
my $self = shift; |
my $self = shift; |
my $chosenValue = $ENV{'form.' . $self->{'variable'} . '.forminput'}; |
my $chosenValue = $ENV{'form.' . $self->{'variable'} . '.forminput'}; |
|
|
if (!defined($chosenValue)) { |
if (!defined($chosenValue) && !$self->{'allowempty'}) { |
$self->{ERROR_MSG} = "You must choose one or more choices to" . |
$self->{ERROR_MSG} = "You must choose one or more choices to" . |
" continue."; |
" continue."; |
return 0; |
return 0; |