5

When adding a field to the address form of the checkout in the front end I could do so by creating a plugin for \Magento\Checkout\Block\Checkout\LayoutProcessor.

I would like to add the same field to the admin panel address forms but cannot see the equivalent class.

Where can I find this?

<---Update--->

I should specify, one of the things that I want to do is change the template of the street fields. As these fields have no name it does not seem possible to access them in the XML.

4

For admin, you need to add field through ui_component form. Magento uses the following form by default.

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

So in your case create customer_form.xml under your module and add a field under address fieldset.

  • Thanks, but this is so confusing. The XML in that file only seems to be applying updates to a previous layout, except I cannot find another layout anywhere that defines the address form. For example, that file does not have any street fields and yet the street fields are rendered. The three lines are bundled together and so there seems to be no way to set the template for individual street inputs. – Matthew Dolman Mar 12 at 7:35

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.