I have created an attribute type: select but I can not display it in the grid client.
the code of my client list.xml
-
- select
- select
- Magento_Ui / js / grid / columns / select
- select
- Customer status
- 190
The UpgradeData.php code
$ attributeCode7 = "customer_status";
$ customerSetup-> addAttribute (Customer :: ENTITY, $ attributeCode7, [
'type' => 'varchar',
'label' => 'Customer Status',
'input' => 'select',
'source' => 'StackCustomerModelAttributeSourceCustomerStatus',
'required' => true,
'visible' => true,
'user_defined' => true,
'sort_order' => 1000,
'position' => 1000,
'system' => false,
'is_used_in_grid' => true,
'is_visible_in_grid' => true,
]);
$ attribute7 = $ customerSetup-> getEavConfig () -> getAttribute (Customer :: ENTITY, $ attributeCode7)
-> addData ([
'attribute_set_id' => $attributeSetId,
'attribute_group_id' => $attributeGroupId,
'used_in_forms' => ['adminhtml_customer', 'customer_account_create', 'customer_account_edit']
]);
$ attribute7-> save ();
I have also created indexer.xml under etc of my module here is the code:
please help me and thanks in advance