yamcsha

Zend - SubForm

May 7th, 2012
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.70 KB | None | 0 0
  1. <?php
  2. $subForm = new Zend_Form_SubForm($name)
  3.  
  4. $elemnet = new Zend_Form_Element_Text('text');
  5. $element->setBelongsTo('$name')
  6.  
  7. $subForm->addElements(array(
  8.     $element
  9. ));
  10.  
  11. $subForm->setElementDecorators(array('ViewHelper'));
  12. $this->addSubForm($subForm, $name);
  13.  
  14. // set Form view helper decorator
  15. $this->setDecorators(array(
  16.                         array(
  17.                               'ViewScript',
  18.                               array('viewScript' => 'forms/actualites.phtml')
  19.                         )
  20. ));
  21.  
  22. // Form view helper
  23. $this->tabContainer()->addPane('details', 'tabTitle',
  24.     '<ul>' .
  25.     '<li>HTML'</li> .
  26.     '</ul>'
  27. )
  28. $this->tabContainer()->tabContainer('details', array());
Advertisement
Add Comment
Please, Sign In to add comment