1
votes

Working with Hybris for first time. I'm trying to find a way to edit some of the forms that are presented while using Hybris Backoffice.

Is there a way to remove fields from some of these default pop up forms? For example see below form to "Create New Title". Is there a way to remove the "Time Created" input field so the user does not see this OR maybe just disable it if there is no way to remove it. Hoping there is some XML configuration that can be edited to make this change (config file).

Creat New Title popup form

2

2 Answers

1
votes

In your custom Extension find a file *backoffice-config.xml, there you can write ,if you donĀ“t already find it , something like this for your type:

 <context type="Product" component="create-wizard">
<wz:flow xmlns:wz="http://www.hybris.com/cockpitng/config/wizard-config" Id="ProductWizard" title="create.product.title">
    <wz:prepare id="productPrepare">
        <wz:initialize property="newProduct" type="Product"/>
        <wz:assign property="newProduct.code" value="ctx.code"/>
    </wz:prepare>
                <wz:step Id="step1" label="create.product.essential.label" sublabel="create.product.essential.sublabel">
                    <wz:info Id="step1.intro" position="top" label="create.product.essential.intro" />
                    <wz:content Id="step1.content">
                        <wz:property-list root="newProduct">
                            <wz:property qualifier="code" type="java.lang.String"/>
                            <wz:property qualifier="catalogVersion"/>
                        </wz:property-list>
                    </wz:content>
                    <wz:navigation Id="step1.navigation">
                        <wz:cancel/>
                        <wz:next visible="!#empty(newProduct.code) and newProduct.catalogVersion != null"/>
                        <wz:done visible="!#empty(newProduct.code) and newProduct.catalogVersion != null">
                            <wz:save property="newProduct"/>
                        </wz:done>
                    </wz:navigation>
                </wz:step>
    ...

or just to delete the property qualifier that you want. For more infos please see https://help.hybris.com/6.7.0/hcd/8bd6b110866910149666f5b05fb95681.html

1
votes

Since, Title type doesn't have create-wizard component declared, So generic Item type create-wizard will be picked. Declare create-wizard for Title type using backoffice Orchestrator.

Title create-wizard XML

<context type="Title" component="create-wizard" module="platformbackoffice">
<wz:flow xmlns:wz="http://www.hybris.com/cockpitng/config/wizard-config" xmlns:advanced-search="http://www.hybris.com/cockpitng/config/advancedsearch" xmlns:df="http://www.hybris.com/cockpitng/component/dynamicForms" xmlns:dsb="http://www.hybris.com/cockpitng/config/dashboard" xmlns:editorArea="http://www.hybris.com/cockpitng/component/editorArea" xmlns:explorer-tree="http://www.hybris.com/cockpitng/config/explorertree" xmlns:list-view="http://www.hybris.com/cockpitng/component/listView" xmlns:simple-search="http://www.hybris.com/cockpitng/config/simplesearch" xmlns:y="http://www.hybris.com/cockpit/config/hybris" id="TitleWizard" title="create.title(ctx.TYPE_CODE)">
  <wz:prepare id="titlePrepare">
    <wz:initialize property="newTitle" type="ctx.TYPE_CODE"/>
  </wz:prepare>
  <wz:step id="step1" sublabel="Create a new Title">
    <wz:content id="step1.content">
      <wz:property-list root="newTitle">
        <wz:property qualifier="code" type="java.lang.String"/>
      </wz:property-list>
    </wz:content>
    <wz:navigation id="step1.navigation">
        <wz:cancel/>
        <wz:done visible="!#empty(newTitle.code)">
            <wz:save property="newTitle"/>
        </wz:done>
    </wz:navigation>
   </wz:step>
</wz:flow>
</context>

find detailed steps here