yceruto / rich-form-bundle
Form features for Symfony applications
Installs: 2 214
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 0
Open Issues: 5
Type:symfony-bundle
Requires
- php: >=7.2.5
- ext-json: *
- symfony/doctrine-bridge: ^5.1
- symfony/form: ^5.1.3
- symfony/framework-bundle: ^5.1
- symfony/options-resolver: ^5.1
Requires (Dev)
- doctrine/data-fixtures: ^1.4.1
- doctrine/doctrine-bundle: ^2.1
- doctrine/doctrine-fixtures-bundle: ^3.3
- doctrine/orm: ^2.7.3
- symfony/asset: ^5.1
- symfony/panther: ^0.7
- symfony/phpunit-bridge: ^5.1
- symfony/translation-contracts: ^1.1
- symfony/twig-bundle: ^5.1
- symfony/var-dumper: ^5.1
- symfony/yaml: ^5.1
This package is auto-updated.
Last update: 2022-05-10 03:02:43 UTC
README
RichForm provides autocomplete form types with optimal performance for your Symfony applications.
Requirements
Backend:
- PHP 7.1.3 or higher;
- Symfony 3.4 applications or higher;
Frontend:
- jQuery v3 or higher - https://jquery.com
- Select2 v4 or higher - https://select2.org
Installation
$ composer require yceruto/rich-form-bundle $ php bin/console assets:install --symlink
Configuration
Controller
# config/routes/rich_form.yaml rich_form: resource: '@RichFormBundle/Resources/config/routing/entity2.xml'
Form Themes
# config/packages/twig.yaml twig: form_themes: - '@RichForm/form/fields.html.twig'
Assets
This bundle doesn't provide any version of the Select2 plugin.
<!doctype html> <html> <head> <link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css" rel="stylesheet" /> <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/js/select2.full.min.js"></script> <script src="{{ asset('bundles/richform/entity2.js') }}"></script> </head>
Basic Usage
$formBuilder->add('category', Entity2Type::class, [ 'class' => Category::class, ]);
The Entity2Type
extends from the built-in EntityType
by adding the most awesome Select2 features:
search via Ajax, pagination and custom result templates. All of them combined with the EntityType
options like query_builder
and new options like search_by
, order_by
, max_results
and more.
License
This software is published under the MIT License