prolix/form-bundle
Prolix Form Bundle is a PHP package that provides reusable form-building components and helpers, simplifying form creation, validation, and rendering in your application. It helps reduce boilerplate and keep form code organized, consistent, and easier to maintain.
GenemuFormBundle is a Symfony2-era bundle that ships additional form types — jQuery UI autocomplete, datepicker, slider, rating, colorpicker, TinyMCE/CKEditor, ReCaptcha, iUpload (Ajax file upload), image crop, and file upload widgets. The prolix/form-bundle package is a vendored/forked copy, so treat the repository at prolixtechnikos/GenemuFormBundle as your authoritative source, not Packagist docs.
Minimal steps:
Verify the fork's state first. Check the composer.json for the symfony/* constraint and the Resources/config tree. A 2022 release date on a Symfony2 bundle almost always means a maintenance tag (PHP 8 compatibility or a metadata bump), not a modernisation. Confirm what Symfony version range it actually declares before wiring anything.
Register the bundle in app/AppKernel.php (or config/bundles.php if the fork has been shimmed for Symfony 3/4):
new Genemu\Bundle\FormBundle\GenemuFormBundle(),
Load the package assets. The bundle depends on jQuery, jQuery UI, and whichever widget library you enable (TinyMCE, CKEditor, ReCaptcha v1...). Either publish with php app/console assets:install --symlink and include them via the bundle's Resources/views/layout.html.twig, or — the more common approach — pull those libraries from your own front-end build and use the bundle purely for the form type definitions.
First use case: start with the smallest widget that requires no vendor JS, e.g. Genemu\Bundle\FormBundle\Form\Type\PlainTextType (renders unescaped/plain text in a form, useful for read-only summaries) or ColorType (outputs an HTML5 <input type="color">). This confirms the bundle registers and the type namespace resolves without dragging jQuery UI in.
Only after that works, move to Genemu\Bundle\FormBundle\Form\Type\JQuery\AutocompleteType, which is the reason most projects ever pulled this bundle in.
Autocomplete with a remote source. The bundle's autocomplete type posts a term to a route and expects a JSON array back. The standard pattern is one controller action per autocomplete field, kept isolated so a broken endpoint doesn't take down the whole form:
$builder->add('customer', AutocompleteType::class, [
'route_name' => 'customer_autocomplete',
'entity_name' => 'AppBundle:Customer', // when using the entity-backed option
'configs' => ['width' => '300px', 'minLength' => 2],
]);
The route handler:
public function autocompleteAction(Request $request)
{
$term = $request->query->get('term', '');
$results = $this->getDoctrine()->getRepository('AppBundle:Customer')
->createQueryBuilder('c')
->where('c.name LIKE :t')
->setParameter('t', $term.'%')
->setMaxResults(20)
->getQuery()->getResult();
return new JsonResponse(array_map(fn($c) => ['id' => $c->getId(), 'label' => $c->getName()], $results));
}
Editor types as a drop-in upgrade path. TinyMceType and CkEditorType subclass TextareaType, so swapping an existing textarea for a rich-text editor is a one-line change and the underlying data transformer/validation is unchanged. This is the highest-leverage pattern in the bundle: migrate field-by-field, not form-by-form.
Datepicker over a DateTime field. JQuery\DateType accepts a date_format and configs array. Bind it to a DateTime property and set widget/format to match what your entity expects. Keep a plain DateType on the same form in a hidden tab so you can A/B against the JS-dependent version.
iUpload for Ajax file fields. Genemu\Bundle\FormBundle\Form\Type\IuploadType gives you a field that posts asynchronously and hides the real <input type="file">. The pattern is to bind it to a FileType-backed property, point route_name at a controller that stores the file and returns JSON { "status": "success", "file": "..." }, then in your form handler move the file from temp storage onto the entity.
Composition over inheritance. The bundle's types are plain Symfony form types. Use them inside CollectionType, inside custom compound types, and inside FormTypeExtensionType — there's nothing magic. If you're on Symfony 3+, prefer wrapping them in your own AbstractType so you don't leak Genemu\... namespaces into controllers and can swap the implementation later.
Symfony2 is the ceiling. The bundle was written for Symfony 2.0–2.8 and depends on APIs (FormTypeInterface::getParent() returning a string, getDefaultOptions() vs configureOptions, setDefaultOptions) that were renamed in 2.8/3.0. Expect to either pin Symfony or maintain a patch. The 2022 release date is not evidence of Symfony 5/6 support — check composer.json before assuming.
Asset manager assumptions. The bundle ships Resources/views/layout.html.twig and a GenemuFormBundle:Form:genemu_jquery* template tree. These assume jQuery UI's theming CSS and its images/ folder are served from the same path. If you're on a modern asset pipeline (Webpack Encore, Vite), disable the bundle templates ('genemu_jqueryui_theme' => false style options) and render the fields yourself with form_widget.
entity_name autocomplete is a liability. The entity-backed autocomplete option builds a DQL query internally from a string like 'AppBundle:Customer'. That string-based repository lookup is deprecated in Symfony 3+ and gone in 4+. Even on Symfony 2, it bypasses your QueryBuilder customisation, so anything beyond LIKE matching (multi-tenancy, soft-deletes, permissions) will need the route_name variant with your own controller.
Debugging empty autocomplete results. If the widget renders but never populates, the cause is almost always a response shape mismatch: the JS expects [{id, label}] (or {id, value} depending on the field's configs), and a 500 from the endpoint is silently swallowed by jQuery UI. Curl the route directly with ?term=foo — if you see an HTML error page, your firewall or CSRF config is intercepting the GET.
ReCaptcha is v1-only. The bundle's ReCaptcha type targets the legacy API. It will not talk to reCAPTCHA v2/v3 without rewriting ReCaptchaType and its validator. Plan to swap that one out entirely; keep the bundle for the jQuery widgets.
Extension points are thin. There's no event system or option resolver hook for the JS config. The supported override is to extend the type class and override getDefaultOptions()/buildView(). If you need custom JS params, subclass and call $view->vars['configs'] = array_merge($this->defaultConfigs, $options['configs']).
Zero dependents, zero stars, low score. Treat this as a private fork you happen to have found, not a maintained dependency. Before adopting: fork it into your own VCS, add a CI matrix that actually runs against the Symfony version you target, and put a migration note in your tech-debt backlog for each type you use. The realistic play is to extract the two or three form types you actually need (autocomplete, editor, datepicker) into a small internal package and drop the rest.
How can I help you explore Laravel packages today?