+% my @pre_options = $opt{pre_options} ? @{ $opt{pre_options} } : ();
+% if ( ! @pre_options
+% && ! $cust_main
+% && ! $opt{is_optional}
+% && ! @{ $opt{cust_location} }
+% && $addnew
+% ) {
+ <INPUT NAME="locationnum" ID="locationnum" TYPE="hidden" VALUE="-1">
+% } else {
+
<SELECT NAME = "locationnum"
ID = "locationnum"
% if ( $opt{onchange} ) {
>
% #false laziness w/select-table.html
-% my @pre_options = $opt{pre_options} ? @{ $opt{pre_options} } : ();
% while ( @pre_options ) {
% my $pre_opt = shift(@pre_options);
% my $pre_label = shift(@pre_options);
% }
</SELECT>
+% }
<%init>
my $conf = new FS::Conf;