Developed with love by KnpLabs Hire us for your project!
16

DependentSelectBundle

by EvercodeLab

This bundle helps to create dependent AJAX fields for Symfony forms

DependentSelectBundle

This is an improved part of ShtumiUsefulBundle. It discontinues all of its features except the dependent select form.
There are lots of new parameters and features (will be documented soon) implemented in DependentFilteredEntity.

Install using Composer:

./composer require evercodelab/dependent-select-bundle

Add the bundle to your AppKernel.php:

$bundles = [
    //...
    new Evercode\DependentSelectBundle\DependentSelectBundle(),
];

Import routes

// app/config/routing.yml

dependent_select:
    resource: '@DependentSelectBundle/Resources/config/routing.xml'

Update your configuration

Add form theme for twig

twig:
    ...
    form:
        resources:
            - DependentSelectBundle::fields.html.twig

Load jQuery to your views (if not yet)

    <script src="http://code.jquery.com/jquery-1.9.1.min.js" type="text/javascript"></script>

Read the documentation

dependent_select:

# Prototype
id:
class: ~
parent_property: ~
role: IS_AUTHENTICATED_ANONYMOUSLY
no_result_msg: No results were found
order_property: id
order_direction: ASC
property: ~
property_complicated: false
case_insensitive: true
search: begins_with
callback: ~
selected_result_service: ~
fallback_alias: ~
grandparent_property: ~
auto_select_first_result: ~
child_entity_filters:

# Prototype
id:
property: ~
sign: =
value: ~
many_to_many:
active: false
entity: ~
property: ~
callback_if_empty_parent: ~
  • Merge pull request #11 from EvercodeLab/fixes/symfony3-compatibility
    By web-flow, 9 months ago
  • Fix #7. Remove getParent from form type
    By , 9 months ago
  • Merge pull request #10 from EvercodeLab/feature/symfony3-compatibility
    By web-flow, 9 months ago
  • symfony3 compatibility
    By KoD2012, 9 months ago
  • Merge pull request #6 from olsmoscow/patch-1
    By web-flow, 11 months ago
  • Update routing.xml
    By web-flow, 1 year ago
  • Merge pull request #5 from EvercodeLab/feature/custom-callback-parameters
    By web-flow, 1 year ago
  • Added the custom callback parameters via form node params
    By , 1 year ago
  • Merge pull request #1 from EvercodeLab/change-php-version-to-5.6
    By web-flow, 1 year ago
  • changed a minimum php version to 5.6.0
    By artemantcev, 1 year ago
  • removed an old array index
    By artemantcev, 1 year ago
  • changed PSR-0 path to PSR-4
    By artemantcev, 1 year ago
  • removed getName() from DependentFilteredEntityType
    By artemantcev, 1 year ago
  • fixed the wrong route call
    By artemantcev, 1 year ago
  • updated README.md
    By artemantcev, 1 year ago
  • changed the root namespace to Evercode
    By artemantcev, 1 year ago
  • removed all the features except DependentFilteredEntity && applied cs-fixer && updated README.md && renamed the bundle
    By artemantcev, 1 year ago
  • Merge pull request #2 from AleF87/patch-1
    By web-flow, 1 year ago
  • Merge pull request #3 from perkelekurat/feature-many-to-many-callback
    By web-flow, 1 year ago
  • Merge branch 'master' into feature-many-to-many-callback
    By web-flow, 1 year ago
  • updated README.md
    By artemantcev, 1 year ago
  • added the callback_if_empty parameter to many_to_many block
    By artemantcev, 1 year ago
  • Update README.md
    By web-flow, 1 year ago
  • PHP7 compatibility
    By , 2 years ago
  • Merge pull request #1 from perkelekurat/Many-to-many_association_support
    By artemantcev, 2 years ago
  • Show all managers if filiation is not chosen
    By , 2 years ago
  • Add group of configuration parameters to realize many-to-many association support
    By boltunoreh, 2 years ago
  • [WIP] add return property parameter
    By boltunoreh, 2 years ago
  • added a null check
    By artemantcev, 3 years ago
  • auto-selected option now can be returned from service
    By artemantcev, 3 years ago