Browse files

Merge branch 'patch-4' of…

…ntation into hotfix/332
  • Loading branch information...
weierophinney committed Oct 2, 2012
2 parents d46d34f + 691d54a commit 44934944ae8e974d419796a77e5f466f66e93970
Showing with 13 additions and 0 deletions.
  1. +13 −0 docs/languages/en/user-guide/forms-and-actions.rst
@@ -303,6 +303,19 @@ but for the two elements that are standalone, we use ``formHidden()`` and
.. image:: ../images/user-guide.forms-and-actions.add-album-form.png
:width: 940 px
+Alternatively, the process of rendering the form can be simplified by using the
+bundled ``formCollection`` view helper. For example, in the view script above replace
+all the form-rendering echo statements with:
+.. code-block:: php
+ echo $this->formCollection($form);
+This will iterate over the form structure, calling the appropriate label, element
+and error view helpers for each element, and wrap the result in open and close form tags.
+This helps reduce the complexity of your view script in situations where the default
+HTML rendering of the form is acceptable.
You should now be able to use the “Add new album” link on the home page of the
application to add a new album record.

0 comments on commit 4493494

Please sign in to comment.