snide/extra-form-bundle

extra form type bundle

Installs: 215

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 1

Open Issues: 0

Language:JavaScript

Type:symfony-bundle

dev-master 2017-04-20 14:41 UTC

This package is not auto-updated.

Last update: 2024-10-26 14:56:19 UTC


README

Extra form types for symfony 2

Scrutinizer Quality Score

features

  • Double list type based on jQuery multiselect2side plugin

Installation

Installation by Composer

If you use composer, add ExtraFormBundle bundle as a dependency to the composer.json of your application

    "require": {
        ...
        "snide/extra-form-bundle": "dev-master"
        ...
    },

Add SnideExtraFormBundle to your application kernel.

// app/AppKernel.php
<?php
    // ...
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Snide\Bundle\ExtraFormBundle\SnideExtraFormBundle(),
        );
    }

The bundle needs to copy the resources necessary to the web folder. You can use the command below:

    php app/console assets:install

Include in template

This bundle comes with an extension for Twig. To init CSS scripts use This makes it very easy to include the extra form Javascript and CSS into your pages only if needed. It will output the complete Javascript, including <script> tags and add stylesheets. Add it to the bottom of your page.

    {{ snide_extra_form_init() }}

Base configuration

    snide_extra_form:
        include_jquery: true

The option include_jquery allows you to load external jQuery library from the Google CDN. Set it to true if you haven't included jQuery on your page.