开发者

Zend Form Decorators Error in Table

开发者 https://www.devze.com 2023-01-17 09:53 出处:网络
I am using the next dec开发者_如何学运维orators for my input. I want to make this as table. $this->setDecorators(array(\'ViewHelper\',\'Errors\',

I am using the next dec开发者_如何学运维orators for my input. I want to make this as table.

$this->setDecorators(array('ViewHelper','Errors',
           array(array('data'=>'HtmlTag'), array('tag' => 'td')),
           array('Label', array('tag' => 'td')),
           array(array('row'=>'HtmlTag'),array('tag'=>'tr'))
   ));

But after form validation Errors showing not in td. How can I do this? I want to make the next makeup:

<table>
   <tr>
      <td>Lable</td>
      <td>Input</td>
      <td>Error</td>
   </tr>
</table>


$this->setDecorators(
   array(
      'ViewHelper',
      array(
         array(
            'data'=>'HtmlTag'
         ),
         array(
            'tag' => 'td'
         )
      ),
      array(
         'Label', 
         array(
            'tag' => 'td'
         )
      ),
      array(
         'Errors', 
         array(
            'tag' => 'td'
         )
      ),
      array(
         array(
            'row'=>'HtmlTag'
         ),
         array(
            'tag'=>'tr'
         )
      )
   )
);
0

精彩评论

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

关注公众号