%#---------- textbox, user enters route as string ----------
% if (!$qa->{Dropdowns}) {
-<% $enterwhat %> (islands, or archipelagoes, separated by |s or commas;
- abbreviations are OK):<br>
+<% $enterwhat %>
+% if (defined($archipelagoes_r)) {
+(islands, or archipelagoes,
+% } else {
+(islands
+% }
+separated by |s or commas; abbreviations are OK):<br>
-<&| qtextstring, qa => $qa, dbh => $dbh,
- thingstring => 'routestring', emsgstore => $emsg_r,
+<&| qtextstring, qa => $qa, dbh => $dbh, emsgstore => $emsg_r,
+ thingstring => defined($archipelagoes_r) ? 'routestring' : 'islandstring',
+ prefix => 'rl',
onresults => sub {
foreach (@_) {
my ($canonname, $island, $arch) = @$_;
push @$islandids_r, $island;
- push @$archipelagoes_r, defined $island ? undef : $arch;
+ push @$archipelagoes_r, defined $island ? undef : $arch
+ if defined $archipelagoes_r;
}
}
&>