Skip to content

Commit

Permalink
Add example for postLink()
Browse files Browse the repository at this point in the history
  • Loading branch information
ravage84 committed Jun 6, 2019
1 parent ca70511 commit 040eca6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion en/views/helpers/form.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2416,7 +2416,14 @@ Creating POST Links
as any valid HTML attributes.

Creates an HTML link, but accesses the URL using the method you specify
(defaults to POST). Requires JavaScript to be enabled in browser.
(defaults to POST). Requires JavaScript to be enabled in browser::

// In your template, e.g. to delete an article
<?= $this->Form->postLink(
'Delete',
['action' => 'delete', $article->id],
['confirm' => 'Are you sure?'])
?>

**Options for POST Link**

Expand Down

0 comments on commit 040eca6

Please sign in to comment.