{ 'field' => 'agentnum',
'type' => 'select-agent',
'empty_label' => 'Select agent',
+ 'colspan' => 6,
},
{ 'field' => 'company',
- 'type' => 'text',
+ 'type' => 'text',
'size' => 50,
+ 'colspan' => 6,
},
{ 'field' => 'contactnum',
'type' => 'contact',
'colspan' => 6,
- ##actually o2m, but this seems to be working for edit so far
- #'m2name_table' => 'contact',
- #'m2name_namecol' => 'contactnum',
- #'m2_label' => 'Contact',
- #'m2_error_callback' => $m2_error_callback,
-
'o2m_table' => 'contact',
'm2_label' => 'Contact',
'm2_error_callback' => $m2_error_callback,
},
- { 'field' => 'locationnum',
- 'type' => 'select-cust_location',
- 'empty_label' => 'No address',
+ { 'field' => 'locationnum',
+ 'type' => 'select-cust_location',
+ 'empty_label' => 'No address',
+ 'disable_empty' => $conf->exists('prospect_main-location_required'),
+ 'alt_format' => $conf->exists('prospect_main-alt_address_format'),
},
],
'new_callback' => $new_callback,
<%init>
my $curuser = $FS::CurrentUser::CurrentUser;
+my $conf = new FS::Conf;
my $prospectnum;
if ( $cgi->param('error') ) {
my $num = $1;
if ( grep $cgi->param("contactnum$num$_"), @gfields ) {
my $x = new FS::contact {
- 'contactnum' => $cgi->param("contactnum$num"),
+ 'contactnum' => scalar($cgi->param("contactnum$num")),
map { $_ => scalar($cgi->param("contactnum${num}_$_")) } @fields,
};
$x;