cancel
Showing results for 
Search instead for 
Did you mean: 

Add nav or tab to Adminhtml Ui Custom module form.

Add nav or tab to Adminhtml Ui Custom module form.

Hello everybody.

 

I have a currently magento 2 EE 2.1 store installed on my server. We just updated from CE 2.0 and we are currently replacing some of the custom modules forms do Ui Components to follow magento standards.

 

We have successfully created the forms with Ui Components on admin html, but only with 1 columnn navigation. And we would like to switch to nav or tab navigation (Currently 1 column, with one form below another), but we couldn't find any examples (Besides using PHP Blocks) and we tried to add the tag <item name"layout"/> the form just does not render. Only the left bar with the spinner but the forms does not render. If i remove the left columnn. The form renders successfully.

 

Does anyone knows if it is a bug, or am i doing something wrong? Thanks.

3 REPLIES 3

Re: Add nav or tab to Adminhtml Ui Custom module form.

I found a example in the file

vendor/magento/module-customer/view/base/ui_component/customer_form.xml

Special observation  in line number 15

 <item name="layout" xsi:type="array">
            <item name="type" xsi:type="string">tabs</item>
            <item name="navContainerName" xsi:type="string">left</item>
        </item>

In the layout file 2 column layout is specified

vendor/magento/module-customer/view/adminhtml/layout/customer_index_edit.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-2columns-left"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
Suman Kar(suman.jis@gmail.com) Magento Certified Developer Plus Skype: sumanphptech Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.

Re: Add nav or tab to Adminhtml Ui Custom module form.

@Suman Kar

 

I try with your above code tab is showing but page is continues loading.

 

Is there any thing else i want to implement in my code?

 

Thanks!  

If Issue Solved, Click Kudos/Accept As solutions.

Re: Add nav or tab to Adminhtml Ui Custom module form.

Search for argument item 

<item name="template" xsi:type="string">templates/form/collapsible</item>

 it is used to display for collapsible structure.

After remove this line of code is working fine. You can use tab structure OR collapsible structure in single UI component form.