Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);
- $customerSetup->addAttribute(MagentoCustomerModelCustomer::ENTITY, 'custom_attr', [
- 'type' => 'varchar',
- 'label' => 'Customer Position',
- 'input' => 'text',
- 'source' => '',
- 'required' => false,
- 'visible' => true,
- 'position' => 999,
- 'system' => false,
- 'backend' => ''
- ]);
- $attribute = $customerSetup->getEavConfig()->getAttribute('customer', 'custom_attr')
- ->addData(['used_in_forms' => [
- 'adminhtml_customer'
- ]]);
- $attribute->save();
Add Comment
Please, Sign In to add comment