1

I have trouble in the Zend 2.0. I made a tutorial: https://packages.zendframework.com/docs/latest/manual/en/user-guide/skeleton-application.html and then I implemented the Smarty by: How can Smarty 3 be Used with Zend Framework 2? Displaying the Form Zend_From in .phtml looks like this:

$form = $this->form;
$form->setAttribute('action', $this->url('album', array('action' => 'add')));
$form->prepare();
echo $this->form()->openTag($form);
echo $this->formHidden($form->get('id'));
echo $this->formRow($form->get('title'));
echo $this->formRow($form->get('artist'));
echo $this->formSubmit($form->get('submit'));
echo $this->form()->closeTag();

But how to display $this->form i Smarty template?

Community
  • 1
  • 1

1 Answers1

0

Solution is:

{assign var="form" value=$this->form}
{assign var="attr" value=$form->setAttribute('action', $this->url('album', ['action' => 'add']))}
{assign var="prep" value=$form->prepare()}
{$this->form()->openTag($this->form)}
{$this->formCollection($this->form)}
{$this->form()->closeTag()}
wonea
  • 4,783
  • 17
  • 86
  • 139