Remove Form Decorators From view file in Zend Framework

If you want complete customization of the zend form, it can be done through the Decorators by using addDisplayGroup() method. But for new users it is little bit difficult and need to write lots of code. You can do this in view script.In view script I had remove all the decoration of the default zend form by using this code:

$form = $this->form;
foreach ($form->getElements() as $element)

Removed all the decoration of the form.
To show the errors before the forms:

foreach ($this->form->getMessages() as $elemName => $messages)
    foreach ($messages as $message)
        $label = $form->getElement($elemName)->getLabel();
        echo $this->escape($label . ':' . $message);

The generate the form in the following way and then organize your form elements as you want.

<form method="<?php echo $form->getMethod() ?>" action="<?php echo $form->getAction() ?>">
          echo $form->categoryName;
          echo'<br />';
          echo $form->groupName;
          echo'<br />';
          echo $form->Submit;
          echo'<br />';
          echo $form->Clear;