anacona16 / dependent-forms-bundle
Symfony DependendFormsBundle
Installs: 2 298
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 2
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.9
- symfony/form: ^5.0
- symfony/framework-bundle: ^5.0
- symfony/property-access: ^5.0
This package is auto-updated.
Last update: 2024-03-25 20:31:53 UTC
README
DependentFormsBundle provides dependent form type.
Important
This bundle is based on: ShtumiUsefulBundle updated for use it with Symfony >= 3.4, 4.0 and 5.0 based on Flex.
Only Dependent Forms included, no Ajax Autocomplete, no DateRange form type, no DQL custom functions.
If you are looking for a previous Symfony version see the branch symfony-33.
Installation
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require anacona16/dependent-forms-bundle
This command requires you to have Composer installed globally, as explained in the Composer documentation.
Verify DependentFormsBundle was added to you kernel
// config/bundles.php return [ // ... Anacona16\Bundle\DependentFormsBundle\DependentFormsBundle::class => ['all' => true], // ... ];
Import routes
# config/routes/dependent_forms.yaml anacona16_dependent_forms: resource: '@DependentFormsBundle/Resources/config/routing.xml'
Update your configuration
Add form theming to twig
# config/packages/twig.yaml twig: ... form_themes: - '@DependentForms/Form/fields.html.twig'
Prepare the Web Assets of the Bundle
php bin/console assets:install --symlink
Load jQuery to your views
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>