Closed jappievw closed 12 years ago
i have same problem, any idea why this is working this way?
Same issue. ZF 1.11
Try to avoid 'ViewHelper' decorator. Below a quick fix for horizontal form file element :
$this->addElement('file', 'photo', array(
'label' => 'Transférer une image:',
'required' => false,
//'destination' => APPLICATION_PATH . '/../public/imagini/agenti',
'validators' => array(/* add your validators */),
'class' => 'input-file',
//'multiFile' => 2,
'decorators' =>
array(
array('File'),
array('FieldSize'),
//array('ViewHelper'),
array('Addon'),
array('ElementErrors'),
array('Description', array('tag' => 'p', 'class' => 'help-block')),
array('HtmlTag', array('tag' => 'div', 'class' => 'controls')),
array('Label', array('class' => 'control-label')),
array('Wrapper'),
),
));
Please referer to http://framework.zend.com/issues/browse/ZF-9733
I had the same problem, however, the above tip solved the problem.
I updated the file element to remove the view helper and prepend the file decorator on the current stack.
When using the form class like below, the input field is added twice. I ensured the Twitter Bootstrap decorator was used. Any clue why this might be happening?