Skip to content

Commit

Permalink
Merge pull request cakephp#3703 from ndm2/fix-post-link-notes
Browse files Browse the repository at this point in the history
Fix `FormHelper::postLink` notes.
  • Loading branch information
markstory committed Jan 27, 2016
2 parents 0f7ab3d + 538773a commit 05be946
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions en/core-libraries/helpers/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1542,9 +1542,12 @@ Creating buttons and submit elements
Creates an HTML link, but access the URL using method POST. Requires
JavaScript to be enabled in browser.

This method creates a ``<form>`` element. So do not use this method inside
an existing form. Instead you should add a submit button using
:php:meth:`FormHelper::submit()`
This method creates a ``<form>`` element. If you want to use this method inside
of an existing form, you must use the ``inline`` or ``block`` options so that the
new form can be rendered outside of its parent.

If all you are looking for is a button to submit your form, then you should use
:php:meth:`FormHelper::submit()` instead.


.. versionchanged:: 2.3
Expand All @@ -1553,9 +1556,9 @@ Creating buttons and submit elements
.. versionchanged:: 2.5
The ``inline`` and ``block`` options were added. They allow buffering
the generated form tag, instead of returning with the link. This helps
avoiding nested form tags. Setting ``'inline' => true`` will add
the form tag to ``postLink`` content block or you can use option ``block``
to specify a custom block.
avoiding nested form tags. Setting ``'inline' => false`` will add
the form tag to the ``postLink`` content block, if you want to use a
custom block you can specify it using the ``block`` option instead.

.. versionchanged:: 2.6
The argument ``$confirmMessage`` was deprecated. Use ``confirm`` key
Expand Down
2 changes: 1 addition & 1 deletion fr/core-libraries/helpers/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@ Création des boutons et des éléments submits
Les options ``inline`` et ``block`` ont été ajoutées. Elles permettent
de mettre en tampon la balise de form générée au lieu de la retourner
avec le lien. Ceci permet d'éviter les balises de form imbriquées.
Définir ``'inline' => true`` va ajouter la balise de form en block
Définir ``'inline' => false`` va ajouter la balise de form en block
de contenu ``postLink`` ou vous pouvez utiliser l'option ``block``
pour spécifier un block personnalisé.

Expand Down

0 comments on commit 05be946

Please sign in to comment.