Skip to content

Magento 2 – Add two custom attributes to customer in a new section

In a Magento 2 (2.4.5) instance, I created a new section in CUSTOMER > CUSTOMER INFORMATION, after “Customer View” (thanks to the tutorial of @rakeshjesadiya https://www.rakeshjesadiya.com/create-tab-in-admin-customer-edit-page-in-magento-2). Now, I need to create two custom customer attributes: “OFFICE” and “LEVEL”. Each customer could be associate in a 1:n relations to OFFICE with an attribution level. So I need to use a button “Add new Associations”, maybe.

Nice to have: OFFICE must be selectable from a select.

As you can view in attachment, I created a simulations view of aspected result.
I know how to add custom attribute to customers but have not idea how to create a “dependent” attributes (OFFICE > level) in a 1:n relations with customer and how to put them in the new section.

Have you a tutorial or any suggestions?
Thank you

enter image description here