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

1 Answer 1

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']],
            ]);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.