0

I want to create customer attribute for the field as dropdown and checkbox and must save as YES/NO in backend in Magento2? Refer screenshot.

enter image description here

0
$customerSetup->addAttribute(Customer::ENTITY, 'is_mobile_verified', [
                'label' => 'Is Mobile Verified ?',
                'input' => 'select',
                'required' => false,
                'sort_order' => 100,
                'visible' => false,
                'system' => false,
                'type' => 'static',
                'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Table',
                'option' => ['values' => ['Yes', 'No']],
            ]);
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.