I have created customer custom attributes using install data, and I want to display this attributes in the Magento admin customer view/personnel information section, next to customer group,
In this picture I have edited my core files and shows the customer group again , similarly I need to show the custom customer attributes, Is there any method of doing it with out editing core files.
My install data file shows below and i also required this fields in the API
$eavSetup->addAttribute(
\Magento\Customer\Model\Customer::ENTITY,
'customer_amnt',
[
'type' => 'varchar',
'label' => 'Customer Amount',
'input' => 'text',
'required' => false,
'visible' => true,
'user_defined' => true,
'position' => 999,
'system' => 0,
'visible_on_front' => true,
'is_used_in_grid' => true,
'is_visible_in_grid' => true,
'is_filterable_in_grid' => true,
]
);
$eavSetup->addAttributeToSet(
CustomerMetadataInterface::ENTITY_TYPE_CUSTOMER,
CustomerMetadataInterface::ATTRIBUTE_SET_ID_CUSTOMER,
null,
'customer_amnt');
$customerCLV = $this->eavConfig->getAttribute(Customer::ENTITY, 'customer_amnt');
$customerCLV->setData(
'used_in_forms',
['adminhtml_checkout',
'adminhtml_customer',
'adminhtml_customer_address',
'customer_account_edit',
'customer_address_edit',
'customer_register_address']
);
$customerCLV->save();