- { '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' => 'company',
+ 'type' => 'text',
+ 'size' => 50,
+ 'colspan' => 7,
+ },
+ { 'field' => 'contactnum',
+ 'type' => 'contact',
+ 'colspan' => 7,
+ 'prospectnum' => $prospectnum,
+ 'm2m_method' => 'prospect_contact',
+ 'm2m_dstcol' => 'contactnum',
+ 'm2_label' => 'Contact',
+ 'm2_error_callback' => $m2_error_callback,
+ 'include_opt_callback' => sub { 'for_prospect' => 1 },
+ 'js_spawn_test' => 'document.edit_topform.residential_commercial_Commercial.checked',
+ },
+ { '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'),
+ 'include_opt_callback' => sub {
+ 'prospect_main' => shift
+ },