How do I use ViewScripts on Zend_Form File Elements?

后端 未结 7 920
心在旅途
心在旅途 2020-11-29 02:43

I am using this ViewScript for my standard form elements:

element->getId(); ?>\"> <
7条回答
  •  無奈伤痛
    2020-11-29 02:53

    Just in case you have followed @Shaun's answer and you are still getting the error: make sure that you've disabled default decorators for the element in question (take look at line 2):

    $this->addElement('file', 'upload_file', array(
    'disableLoadDefaultDecorators' => true,
    'decorators' => array('File', array('ViewScript', array(
        'viewScript' => '_form/file.phtml',
        'placement' => false,
    ))),
    'label' => 'Upload',
    'required' => false,
    'filters' => array(),
    'validators' => array(array('Count', false, 1),),
    ));
    

提交回复
热议问题