3

I want remove all buttons from customer edit page in adminpanel in magento 2

2 Answers 2

0

If You want definitely remove buttons for all users in Customer Edit Page You can do it by delete nodes in section <item name="buttons" xsi:type="array"> in file:
\app\code\Magento\Customer\view\base\ui_component\customer_form.xml

Delete just buttons You need to delete.

2
  • I tried it is not working i placed the code into app/code/magento/customer/view/base/ui_component/customer_form.xml and i removed node "still it is not working" it reflecting changes from vendor/magento_customer/view\base\ui_component\customer_form.xml only Commented Feb 2, 2017 at 11:18
  • Run php bin/magento setup:upgrade after that Commented Feb 2, 2017 at 11:34
0

You can easily remove one of the buttons added into vendor/magento/module-customer/view/base/ui_component/customer_form.xml, declaring a new customer_form.xml file into a custom module with the following path:

app/code/VendorName/ModuleName/view/base/ui_component/customer_form.xml

and the content will be:

<?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">
    <argument name="data" xsi:type="array">
        <item name="buttons" xsi:type="array">
            <item name="order" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="componentDisabled" xsi:type="boolean">true</item>
                </item>
            </item>
        </item>
    </argument>
</form>

In this case I'm removing the "Create Order" button, but you can do the same for all the items declared into the core customer_form.xml file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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