+ } elsif ( $flag eq 'M' ) { #manually assign from inventory
+ $f->{'type'} = 'select-inventory_item';
+ $f->{'empty_label'} = 'Select inventory item';
+ $f->{'extra_sql'} = 'WHERE ( svcnum IS NULL ' .
+ ($object->svcnum && ' OR svcnum = '.$object->svcnum) .
+ ')';
+ $f->{'classnum'} = $columndef->columnvalue;
+ $f->{'disable_empty'} = $object->svcnum ? 1 : 0;
+
+ } elsif ( $flag eq 'H' ) { #hardware
+ $f->{'type'} = 'select-hardware_type';
+ $f->{'hashref'} = {
+ 'classnum'=>$columndef->columnvalue
+ };
+
+ } elsif ( $flag eq 'S' #selectable choice
+ && $f->{type} !~ /^select-svc/ ) {
+ $f->{type} = 'select';
+ $f->{options} = [ split( /\s*,\s*/,
+ $columndef->columnvalue)
+ ];
+ } # shouldn't this be enforced for all 'S' fields?
+
+ elsif ( $flag eq 'P' ) { #form fcc_477 values
+ $f->{type} = 'fixed';
+ my $cust_pkg = FS::Record::qsearchs({
+ 'table' => 'cust_pkg',
+ 'hashref' => { 'pkgnum' => $object->{Hash}->{pkgnum} }
+ });
+ my $fcc_record = $cust_pkg->fcc_477_record('broadband_'.$columndef->columnvalue.'stream') if $cust_pkg;
+ $f->{'value'} = $fcc_record->{Hash}->{optionvalue} ? $fcc_record->{Hash}->{optionvalue} * 1000 : '';
+ } # end 477 values
+
+ if ( $f->{'type'} =~ /^select-svc/ )
+ {