6
다음 Zend Form이 오류를 발생시키는 문제가 있습니다. 문제는 "파일"요소이며 setElementDecorators를 사용하는 것입니다.젠드 파일 업로드 및 요소 데코레이터
class Products_AddForm extends Zend_Form
{
function init() {
// other form elements...
$uploadElement = new Zend_Form_Element_File('Excel');
$uploadElement->setLabel('Excel');
$this->addElement($uploadElement);
$this->setElementDecorators(array(
'ViewHelper',
'Errors',
array(array('data' => 'HtmlTag'), array('tag' => 'td')),
array('Label', array('tag' => 'th')),
array(array('row' => 'HtmlTag'), array('tag' => 'tr'))
));
}
}
오류가 발생합니다.
작동합니다SetElementDecorators
후 마지막에
$uploadElement->addDecorator('File');
추가
(Warning: Exception caught by form: No file decorator found... unable to render file element Stack Trace: #0)
, 그러나 이것은 나에게 파일 요소를 두 번 줄 것이다!
아무도 도와 줄 수 있습니까?
TIA 매트
고마워요 4 ur 도움. 이 throw 추가 : 경고 : 폼에 의해 catch 된 예외 : 메서드 getMaxFileSize 존재하지 않습니다 스택 추적 : # 0 – frgtv10
내 대답 업데이트했습니다 : –
작동합니다. havnt는 zend의 문서에서 이것을 알아 차렸다!? :/ 감사! – frgtv10