开发者

Zend_Form setMultiFile()

开发者 https://www.devze.com 2023-01-03 06:02 出处:网络
i got a question related to the setMultiFile method of zend_form. I already got a form like this: $foto->setLabel(\'Foto:\');

i got a question related to the setMultiFile method of zend_form.

I already got a form like this:

$foto->setLabel('Foto:');
      $foto->addValidator('IsImage', true);
      $foto-开发者_开发知识库>addValidator('Count', true, 12);
      $foto->addValidator('Extension', true, 'gif,png,jpg');
      $foto->setDestination(PUBLIC_PATH.'/upload/img/');
      $foto->addFilter('Rename', array(
             'target' => PUBLIC_PATH.'/upload/img/', 
             'overwrite' => true
      ));
      $foto->setMultiFile(12);
      $foto->addDecorators(array(
           array('Description',array('tag'=>'','escape'=>false))
      )); 

And it's everything working...but now i need to iterate each element to set a description and decorators...any suggestions ? Thanks to everyone that will reply to this, i'm drivin crazy with that..


What elements are you talking about? If this is about form elements, then you can use something like this:

$form->setElementsDecorators(array('ViewHelper', 'Label'));
0

精彩评论

暂无评论...
验证码 换一张
取 消