0

In my form I have:

$uploads    = new Zend_Form_Element_Text('upload');
$options    = array('viewScript' => 'form/upload.phtml');
$decorators = array(array('ViewScript', $options));
$this->upload->setDecorators($decorators);

In /application/module/admin/view/scripts/form/upload.phtml I've put some random content. The problem is that element is still Text Element.

I tried to use ah's solution from Add some html to Zend Forms solution to put html in my form. Against <div id="wmd-button-bar" class="wmd-panel"></div> I've got <input type="hidden" name="dummy" />

Notice: I'm using EasyBib_Form (https://github.com/easybib/EasyBib_Form_Decorator)

How to fix problem that element is not replaced by viewscript?

Community
  • 1
  • 1
PiKey
  • 628
  • 5
  • 24
  • And what's your question? – Rolando Isidoro May 07 '13 at 18:35
  • How to fix problem that element is not replaced by viewscript – PiKey May 07 '13 at 19:35
  • 1
    I think you misunderstand the purpose of the viewScript decorator. It doesn't change the nature of the elements it just provides more flexibility in how they are displayed. check http://stackoverflow.com/questions/10349340/how-to-print-a-group-display-individually-from-its-content/10349705#10349705 – RockyFord May 08 '13 at 10:09

0 Answers0