【问题标题】:How to add standard field to custom layout of SugarCRM 7如何在 SugarCRM 7 的自定义布局中添加标准字段
【发布时间】:2015-02-06 11:13:18
【问题描述】:

我需要为自定义模块创建向导。使用https://www.sugaroutfitters.com/blog/creating-a-layout-and-view-for-a-module-in-sugarcrm-7的示例很容易

我创建自定义布局,

    $viewdefs['mymodulename']['base']['layout']['wizard'] = array(
    'type' => 'simple',
    'components' =>
    array(
        array(
            'view' => 'wizard',
        ),
    ),
);

hbs 模板

    {{> wizard.header }}
<div class="tcenter">
    Step 1
    <br/><br/>
    <button class="previousStep btn btn-success">Previous</button>
    <button class="nextStep btn btn-success">Next</button>
</div>
{{> wizard.footer }}"

和控制器:

    ({
    className: 'mymodulename-wizard     
...

是否可以在此自定义布局中添加和使用标准 SugarCRM 字段(下拉菜单、日历、货币、相关字段等),例如在标准记录视图中,通过使用元数据或其他方式?或者一定需要在我的自定义 hbs-template 中创建自定义控件?

【问题讨论】:

    标签: sugarcrm


    【解决方案1】:

    可以,但您需要在模板中使用 {{field}} Handlebars 助手来插入它们。

    要查看如何使用字段助手的示例,请参阅 Sugar 7.5 中的 dashablelist.hbspreview.hbs

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多