How to add standard field to custom layout of SugarCRM 7

白昼怎懂夜的黑 提交于 2019-12-11 04:15:42

问题


I need create wizard for custom module. It was easy by using example at https://www.sugaroutfitters.com/blog/creating-a-layout-and-view-for-a-module-in-sugarcrm-7

I create custom layout,

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

hbs-template

    {{> 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 }}"

and controller:

    ({
    className: 'mymodulename-wizard     
...

Is it possible to add and use standard SugarCRM fields (dropdown, calendar, currency, relate field etc.) on this custom layout, like in standard record view, by using metadata or as otherwise? Or necessarily need to create custom controls in my custom hbs-template?


回答1:


Yes, you can though you will need to use the {{field}} Handlebars helper in your template to insert them.

To see examples of how to use field helper see dashablelist.hbs or preview.hbs in Sugar 7.5.



来源:https://stackoverflow.com/questions/28364493/how-to-add-standard-field-to-custom-layout-of-sugarcrm-7

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!