Skip to content
This repository has been archived by the owner on May 24, 2018. It is now read-only.

Commit

Permalink
Merge pull request #1465 in master
Browse files Browse the repository at this point in the history
  • Loading branch information
GeeH committed Apr 26, 2015
2 parents 8d94c67 + 4408c31 commit 8bcf59d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/src/user-guide/forms-and-actions.rst
Expand Up @@ -65,6 +65,14 @@ Within the constructor of ``AlbumForm`` we do several things. First, we set the
of the form as we call the parent’s constructor. we create four form elements: the id, title, artist, and submit button. For each item we set
various attributes and options, including the label to be displayed.

.. note::

HTML-Forms can be sent using ``POST`` and ``GET``. ZF2s default is ``POST``, therefore you don't have to be
explicit in setting this option. If you want to change it to ``GET`` though, all you have to do is set the
specific attribute in the constructor.

``$this->setAttribute('method', 'GET');``

We also need to set up validation for this form. In Zend Framework 2 this is
done using an input filter, which can either be standalone or defined within any class
that implements the ``InputFilterAwareInterface`` interface, such as a model entity. In our case, we are
Expand Down

0 comments on commit 8bcf59d

Please sign in to comment.