0

I want to display DOB field at edit and not in Registration page.

3

Enable DOB from admin side

store -> configuration -> Customer Configration -> Name and Address Option -> Show Date of Birth

Now to hide it from Registration page as your need, you have to comment this line:

Override template /vendor/magento/module-customer/view/frontend/templates/form/register.phtml to /app/design/frontend/Vendor/Theme/Magento_Customer/templates/form/register.phtml

<?php if ($_dob->isEnabled()): ?>
    <?/*= $_dob->setDate($block->getFormData()->getDob())->toHtml() */?>
<?php endif ?>
2
  • its not good idea to edit default modules na?
    – Ravindra
    Sep 11 '18 at 8:03
  • you need to override template check i have updated answer Sep 11 '18 at 8:08

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.