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?

2
  • What do you mean by "mailto functionality"? Commented Dec 21, 2013 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
    Commented Dec 23, 2013 at 5:39

1 Answer 1

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

Your Answer

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

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