PHPackages                             nowo-tech/select-all-choice-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nowo-tech/select-all-choice-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

nowo-tech/select-all-choice-bundle
==================================

Symfony bundle that adds a 'Select all' checkbox for ChoiceType fields with multiple=true (expanded or select).

v1.4.1(1mo ago)0222↓50%MITTypeScriptPHP &gt;=8.2CI passing

Since Mar 2Pushed 1mo agoCompare

[ Source](https://github.com/nowo-tech/SelectAllChoiceBundle)[ Packagist](https://packagist.org/packages/nowo-tech/select-all-choice-bundle)[ Docs](https://github.com/nowo-tech/SelectAllChoiceBundle)[ RSS](/packages/nowo-tech-select-all-choice-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (14)Versions (6)Used By (0)

Select All Choice Bundle
========================

[](#select-all-choice-bundle)

[![CI](https://github.com/nowo-tech/SelectAllChoiceBundle/actions/workflows/ci.yml/badge.svg)](https://github.com/nowo-tech/SelectAllChoiceBundle/actions/workflows/ci.yml) [![Packagist Version](https://camo.githubusercontent.com/391d70e5ac2a16aebb29412c2f4a92428dae7cd7a146203ccbf45b71fede4f52/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e6f776f2d746563682f73656c6563742d616c6c2d63686f6963652d62756e646c652e7376673f7374796c653d666c6174)](https://packagist.org/packages/nowo-tech/select-all-choice-bundle) [![Packagist Downloads](https://camo.githubusercontent.com/a2fdc6f0fd128b47edc47db2d8b1fc0bd4f8dc04cb35638a695b3c867060485d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e6f776f2d746563682f73656c6563742d616c6c2d63686f6963652d62756e646c652e737667)](https://packagist.org/packages/nowo-tech/select-all-choice-bundle) [![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE) [![PHP](https://camo.githubusercontent.com/3f99b197569aa2dcfbefff17ecc68d74098e7f929d8b52dc40f3a898f740eae1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322532422d3737374242343f6c6f676f3d706870)](https://php.net) [![Symfony](https://camo.githubusercontent.com/14a8a35146549d981b2ec9e844832719c6d44417e478603dbbd9bebb50a0fcc1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d37253230253743253230382d3030303030303f6c6f676f3d73796d666f6e79)](https://symfony.com) [![GitHub stars](https://camo.githubusercontent.com/290bc488f3b79e0369d7a2cd6a8855e8d34f0c57833a505536540deb831ec882/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6e6f776f2d746563682f73656c6563742d616c6c2d63686f6963652d62756e646c652e7376673f7374796c653d736f6369616c266c6162656c3d53746172)](https://github.com/nowo-tech/SelectAllChoiceBundle)

**Symfony bundle that adds an optional "Select all" checkbox for `ChoiceType` fields with `multiple=true`** — for both expanded (checkboxes) and collapsed (``) rendering. **Frontend-driven**: the backend marks the field and passes config via data attributes; a **Stimulus** controller creates and manages the toggle in the browser. Built with **TypeScript** and **Vite** (no Webpack Encore, no Importmap). For **Symfony 7 and 8** · PHP 8.2+.

> ⭐ **Found this useful?** Give it a **star** on [GitHub](https://github.com/nowo-tech/SelectAllChoiceBundle) so more developers can find it.

Table of contents
-----------------

[](#table-of-contents)

- [Quick search terms](#quick-search-terms)
- [Features](#features)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Documentation](#documentation)
- [Requirements](#requirements)
- [Demo](#demo)
- [Development](#development)
- [License &amp; author](#license--author)

Quick search terms
------------------

[](#quick-search-terms)

Looking for **Symfony ChoiceType select all**, **multiple choice select all checkbox**, **Stimulus form select all**, **Symfony form expanded choice**, **multi-select select all**, **ChoiceType Stimulus**, **Symfony 7 8 select all**? You're in the right place.

Features
--------

[](#features)

- ✅ **Opt-in** — "Select all" appears only when the field has `select_all => true`
- ✅ **Two modes** — Works with `expanded=true` (checkboxes) and `expanded=false` (multi-select)
- ✅ **Translatable label** — Default key `form.select_all`, overridable with `select_all_label`; 60 languages included
- ✅ **Configurable** — Position (before/after), CSS classes for toggle and container
- ✅ **Sync state** — Toggle reflects "all selected" / "none" / indeterminate; manual selection updates the toggle
- ✅ **Events** — Dispatches `change` with `bubbles: true` so other libs (TomSelect, validators) can react
- ✅ **Multiple fields** — Safe with several select-all choice fields on the same page
- ✅ **Frontend-driven** — Backend passes config via data attributes; a small script or Stimulus controller creates and manages the checkbox in the DOM
- ✅ **Works with or without Stimulus** — Include the built `select-all-choice.js` script for auto-init (and dynamic content via MutationObserver), or register the Stimulus controller if your app already uses it
- ✅ **TypeScript + Vite** — Bundle assets are TypeScript; the bundle ships a built IIFE for standalone use; your app’s Vite can also import the controller (no Encore/Importmap)
- ✅ Compatible with **Symfony 7 and 8** and **FrankenPHP** (including worker mode)

Installation
------------

[](#installation)

```
composer require nowo-tech/select-all-choice-bundle
```

**1. Register the bundle** in `config/bundles.php`:

```
