1

How can i new field in admin filed that contain mailto functionality

$fieldset->addField('email', 'link', array(
    'label'     => Mage::helper('mumodule')->__('Email'),
    "target"=>"_blank",
    'mailto' => Mage::registry('mumodule')->getData('email'),
    'class'     => 'required-entry',
    'required'  => true,
    'name'      => 'title',
    ));

using this way i cant add functionality.

is it possible to add new filed with mailto functionality?

  • What do you mean by "mailto functionality"? – Fabian Blechschmidt Dec 21 '13 at 15:57
  • means when click on email it use to mailto functionality of php function by the way i achieve answer,,thanks for comment – Keyur Shah Dec 23 '13 at 5:39
2

I believe what you're trying to do is create a mailto: link? In which case, the mailto: is part of the URL so it should be assigned in the href attribute:

$fieldset->addField('email', 'link', array(
    'label'     => Mage::helper('mumodule')->__('Email'),
    'target'    => '_blank',
    'href'      => 'mailto:' . urlencode(Mage::registry('mumodule')->getData('email')),
    'class'     => 'required-entry',
));

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.