0

I want to sort and group Customer Attributes in back-office view. There is no problem with sorting but how can I group it? There is no Attribute Set/Groups like for product attributes. I want to make a few sections in this view. What is the best way to do it? enter image description here

  • you want to group your custom attributes or predefined customer attributes – ASQ Sep 11 at 10:03
  • I need to group all of them, but mainly custom attributes – Wojciech Ka Sep 11 at 10:06
1

You can try this:

Create file customer_form.xml in Vendor/Module/view/adminhtml/ui_component

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">

  <fieldset name="customer">   
    <fieldset name="test">
       <argument name="data" xsi:type="array">
           <item name="config" xsi:type="array">
               <item name="label" xsi:type="string" translate="true">Test Tab</item>
               <item name="sort_order" xsi:type="string">100</item>
               <item name="collapsible" xsi:type="boolean">true</item>
           </item>
       </argument>
       <field name="field1">
           <argument name="data" xsi:type="array">
               <item name="config" xsi:type="array">
                   <item name="dataType" xsi:type="string">text</item>
                   <item name="formElement" xsi:type="string">input</item>
                   <item name="label" xsi:type="string">Field 1</item>
               </item>
           </argument>
       </field>
     </fieldset>
  </fieldset>

</form>

enter image description here

Hope it will be helpful

  • Do you think it is possible to add existing attributes to this fieldset named test? instead of creating new ones (FIeld1) – Wojciech Ka Sep 11 at 15:59
  • yes you can just mention their name in the field name – ASQ Sep 12 at 4:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.