PHPackages                             alb/fselectmenu - 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. alb/fselectmenu

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

alb/fselectmenu
===============

Fast and non-intrusive HTML select menu

1.1.1(12y ago)72.4k5[2 issues](https://github.com/arnaud-lb/fselectmenu/issues)[1 PRs](https://github.com/arnaud-lb/fselectmenu/pulls)MITJavaScriptPHP &gt;=5.3.0

Since Jun 27Pushed 10y ago1 watchersCompare

[ Source](https://github.com/arnaud-lb/fselectmenu)[ Packagist](https://packagist.org/packages/alb/fselectmenu)[ Docs](https://github.com/arnaud-lb/fselectmenu)[ RSS](/packages/alb-fselectmenu/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

FSelectMenu
===========

[](#fselectmenu)

[![Build Status](https://camo.githubusercontent.com/5b9e4745cf30a68c99b411e16023010a1e15370aa1f16baafd00324f3d1eb7b8/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f61726e6175642d6c622f6673656c6563746d656e752e706e67)](http://travis-ci.org/arnaud-lb/fselectmenu)

FSelectMenu is a Fast and non-intrusive HTML select menu.

Features:
---------

[](#features)

- **Fast**: rendering is done on the server side: no DOM manipulation on the client side
- **Non intrusive**: Once FSelectMenu is initialized you can forget it: every select menu will work, whether they were present during initialization or added later. (FSelectMenu uses event delegation. The HTML code is generated on the server; all that is left to FSelectMenu is to listen for events bubbling to the document element.).
- **Non intrusive**: Works out of the box with existing scripts

    - Scripts don't have to know anything about FSelectMenu for simple things like listening for events, getting and changing the value, etc.
    - Scripts interact with the native select element directly

Usage
-----

[](#usage)

Load and init the FSelectMenu javascript module:

```
require(['fselectmenu/fselectmenu'], function(FSelectMenu) {
    FSelectMenu.init();
});
```

That's all.

If you add new select menus on the document after that, you don't have to call `.init()` again.

Just trigger the `change` event on the native select element when programmatically changing its value.

Install
-------

[](#install)

```
$ git submodule add git://github.com/arnaud-lb/fselectmenu.git vendor/fselectmenu

```

### Plain PHP

[](#plain-php)

You can render a FSelectMenu with the FSelectMenu\\Renderer class:

```
