aijko/aijko-widgetimagechooser — pull request #7 by amenk (2013-06-25 11:39:52+00:00)
Title: Allow setting a form-element prefix.

For me this was useful in order to use the chooser on cms_page/edit

There might be a cleaner solution with extending from a different, more general class.
But at least this solution is simple and does not break anything.

Example:

$thumbnailField = $fieldset->addField('thumbnail', 'text', array(
'label' => Mage::helper('cms')->__('Thumbnail'),
'title' => Mage::helper('cms')->__('Thumbnail'),
'disabled' => false,
'value' => $model->getThumbnail(),
));

$renderer = Mage::app()->getLayout()->createBlock('widgetimagechooser/chooser');
$renderer->setElementPrefix('page_');
$thumbnailField->setRenderer($renderer);