2015-02-06 67 views
2

我需要为自定义模块创建向导。这是通过使用例如容易在https://www.sugaroutfitters.com/blog/creating-a-layout-and-view-for-a-module-in-sugarcrm-7如何将标准字段添加到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  
... 

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

回答

0

是的,虽然您需要在模板中使用{{field}} Handlebars helper来插入它们。

要查看如何使用现场帮手的示例,请参阅Sugar 7.5中的dashablelist.hbspreview.hbs

相关问题