Symfony2 form button as a link (ex. Cancel action).

Installs: 903

Dependents: 2

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type: symfony-bundle

v1.1.1 2015-02-02 21:16 UTC


This bundle provides an form extension of a form button to allow an HTML "" tag as a button. For example, a cancel link on a form.


1. Add the bundle to your composer.json

"require": {
    "symfonycontrib/link-button-bundle": "~1.0"

2. Install the bundle using composer

$ composer update symfonycontrib/link-button-bundle

3. Add this bundle to your application's kernel:

    new SymfonyContrib\Bundle\LinkButtonBundle\LinkButtonBundle(),

How to Use

To use, simply pass a URL to an url option of a form button.

** Example Form **

->add('cancel', 'button', [
    'url' => '/',