I've create a custom attribute for the customer_address.
It is at backend:
$customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
$customerSetup->addAttribute('customer_address', 'my_id', [
'label' => 'My label',
'input' => 'text',
'type' => 'int',
'source' => '',
'required' => false,
'position' => 1000,
'visible' => false,
'system' => false,
'is_used_in_grid' => false,
'is_visible_in_grid' => false,
'is_filterable_in_grid' => false,
'is_searchable_in_grid' => false,
]);
$attribute = $customerSetup->getEavConfig()->getAttribute('customer_address', 'my_id')
->addData([
'used_in_forms' => ['adminhtml_customer_address']
]);
$attribute->save();
But the textbox is still appears on the forms where Address
is.
Why?
I thought this will solve my problem:
'visible' => false,