0

How to remove default newsletter registration form email validation magento to add phone number? In resume, to replace e-mail by phone number. Magento 1.9.0.0

Thanks!

  • You will need email if you're doing "newsletter" registration yes? Otherwise you need a different form entirely. – camdixon Nov 7 '16 at 12:35
0

You can change this via custom coding.

  1. You have to override the newAction method of the file app/code/core/Mage/Newsletter/controllers/SubscriberController.php and remove these line from that method

    if (!Zend_Validate::is($email, 'EmailAddress')) {
        Mage::throwException($this->__('Please enter a valid email address.'));
    }
    
  2. change the html validation here : app/design/frontend/{namespace}/{theme}/template/newsletter/subscribe.phtml

Change input type from email to text from field email

Remove class validate-email from field email

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.