Skip to main content
fixed a name
Source Link
skymeissner
  • 381
  • 4
  • 15

I want to move fields on customer/index/edit. Creating another fieldset can be done with

<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="my-new-fiels">fields">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Additional Information</item>
        </item>
    </argument>
    <field name="blablupp">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" translate="true" xsi:type="string">buueeyyy</item>
                <item name="visible" xsi:type="boolean">true</item>
                <item name="dataType" xsi:type="string">text</item>
                <item name="formElement" xsi:type="string">input</item>
                <item name="source" xsi:type="string">customer</item>
            </item>
        </argument>
    </field>
</fieldset>

And even hiding a field from an existing fieldset is easy by adding to the customer fieldset:

<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="customer">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Additional Information</item>
        </item>
    </argument>
    <field name="prefix">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="visible" xsi:type="boolean">false</item>
        </argument>
    </field>
</fieldset>

But what I really want is to move a field from customer to another to simplify life for unexperienced admin users. How is that accomplished?

I want to move fields on customer/index/edit. Creating another fieldset can be done with

<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="my-new-fiels">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Additional Information</item>
        </item>
    </argument>
    <field name="blablupp">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" translate="true" xsi:type="string">buueeyyy</item>
                <item name="visible" xsi:type="boolean">true</item>
                <item name="dataType" xsi:type="string">text</item>
                <item name="formElement" xsi:type="string">input</item>
                <item name="source" xsi:type="string">customer</item>
            </item>
        </argument>
    </field>
</fieldset>

And even hiding a field from an existing fieldset is easy by adding to the customer fieldset:

<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="customer">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Additional Information</item>
        </item>
    </argument>
    <field name="prefix">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="visible" xsi:type="boolean">false</item>
        </argument>
    </field>
</fieldset>

But what I really want is to move a field from customer to another to simplify life for unexperienced admin users. How is that accomplished?

I want to move fields on customer/index/edit. Creating another fieldset can be done with

<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="my-new-fields">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Additional Information</item>
        </item>
    </argument>
    <field name="blablupp">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" translate="true" xsi:type="string">buueeyyy</item>
                <item name="visible" xsi:type="boolean">true</item>
                <item name="dataType" xsi:type="string">text</item>
                <item name="formElement" xsi:type="string">input</item>
                <item name="source" xsi:type="string">customer</item>
            </item>
        </argument>
    </field>
</fieldset>

And even hiding a field from an existing fieldset is easy by adding to the customer fieldset:

<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="customer">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Additional Information</item>
        </item>
    </argument>
    <field name="prefix">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="visible" xsi:type="boolean">false</item>
        </argument>
    </field>
</fieldset>

But what I really want is to move a field from customer to another to simplify life for unexperienced admin users. How is that accomplished?

Source Link
skymeissner
  • 381
  • 4
  • 15

How to move things around in UI Components in magento2?

I want to move fields on customer/index/edit. Creating another fieldset can be done with

<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="my-new-fiels">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Additional Information</item>
        </item>
    </argument>
    <field name="blablupp">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="label" translate="true" xsi:type="string">buueeyyy</item>
                <item name="visible" xsi:type="boolean">true</item>
                <item name="dataType" xsi:type="string">text</item>
                <item name="formElement" xsi:type="string">input</item>
                <item name="source" xsi:type="string">customer</item>
            </item>
        </argument>
    </field>
</fieldset>

And even hiding a field from an existing fieldset is easy by adding to the customer fieldset:

<form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<fieldset name="customer">
    <argument name="data" xsi:type="array">
        <item name="config" xsi:type="array">
            <item name="label" xsi:type="string" translate="true">Additional Information</item>
        </item>
    </argument>
    <field name="prefix">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="visible" xsi:type="boolean">false</item>
        </argument>
    </field>
</fieldset>

But what I really want is to move a field from customer to another to simplify life for unexperienced admin users. How is that accomplished?