I am trying to make use of the admin form field with type button.
$fieldset->addField('register', 'button', array(
'label' => Mage::helper('module')->__('Button Caption'),
'onclick' => 'test()'
));
however, I expected the label to be actually rendered as the button caption (ON the button) but it is rendered as label text (IN FRONT of the button). I tried, to put title, value, html, innerHTML, looked through the button.php but I cannot figure out how to actually but the button Caption so that Magento renders it like <button>Button Caption</button>
there ought to be a way, cause otherwise the button type is pretty much useless.
Best Answer
It should work with
value
:Just make sure that at the end of your form declaration you don't do this:
This will override the value of the button input. Use this instead.