【发布时间】:2016-11-03 21:58:18
【问题描述】:
我正在开发一个自定义套件 CRM 模块,但我发现地址字段受到限制,因为它使用国家和州字段的文本字段。
我已尝试按照本网站上的说明进行研究:
但是我被困在第 5 步,因为我的自定义模块没有元数据目录???
-
转到 /custom/modules/Leads/metadata 并更新 editviewdefs.php。查找此代码:
数组 ( '名称' => 'primary_address_street', 'hideLabel' => 真, '类型' => '地址', '显示参数' => 大批 ( '键' => '主要', '行' => 2, 'cols' => 30, '最大长度' => 150, ), ), 1 => 大批 ( '名称' => 'alt_address_street', 'hideLabel' => 真, '类型' => '地址', '显示参数' => 大批 ( '键' => 'alt', '复制' => '主要', '行' => 2, 'cols' => 30, '最大长度' => 150, ), ),
并将类型从 Address 更新为 CustomAddress
array (
'name' => 'primary_address_street',
'hideLabel' => true,
'type' => 'CustomAddress',
'displayParams' =>
array (
'key' => 'primary',
'rows' => 2,
'cols' => 30,
'maxlength' => 150,
),
),
1 =>
array (
'name' => 'alt_address_street',
'hideLabel' => true,
'type' => 'CustomAddress',
'displayParams' =>
array (
'key' => 'alt',
'copy' => 'primary',
'rows' => 2,
'cols' => 30,
'maxlength' => 150,
),
),
有人可以告诉我如何在我的自定义模块下拉列表中创建地址字段而不是文本字段吗?
【问题讨论】: