开发者

create a table in td using zend decorator

开发者 https://www.devze.com 2023-02-26 13:48 出处:网络
I am using zend forms and zend decorators. I want to create a sub-table in a parent table\'s td. like this:

I am using zend forms and zend decorators.

I want to create a sub-table in a parent table's td. like this:

<table>
  <tr>
   <td>Username:</td>
   <td>
     <table>
      <tr>
       <td> <input type="text"> </td>
       <td> <img/> </td>
      </tr>
     </table>
   </td>
  </tr>
</table>

How can i crea开发者_运维问答te this table. can anyone help me plz.


This might not be the best solution, as you maybe able to create your own decorator to render the form (with the sub-tables). But you could always render each form element individually, using the renderViewHelper() function

<table>
  <tr>
   <td>Username:</td>
   <td>
     <table>
      <tr>
       <td><?php echo $this->form->username->renderViewHelper() ?></td>
       <td> <img/> </td>
      </tr>
     </table>
   </td>
  </tr>  <tr>
   <td>AnotherElement:</td>
   <td>
     <table>
      <tr>
       <td><?php echo $this->form->anotherElement->renderViewHelper() ?></td>
       <td> <img/> </td>
      </tr>
     </table>
   </td>
  </tr>
</table>
0

精彩评论

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