我已经尝试了所有我能想到的东西,但我不知道如何只ViewHelper
在Zend_Form_Element_File
.
$UserPhoto = new Zend_Form_Element_File('UserPhoto');
$UserPhoto->setDestination(TMP_DIR);
$UserPhoto->addValidator('Count', false, 1);
$UserPhoto->addValidator('Size', false, 10240000); // 10 mb max
$this->addElement($UserPhoto);
在我看来脚本:
echo $this->form->UserPhoto
产生
<dt>label</dt>
<dd>input element</dd>
这就是我要的:
input element