PHPackages                             nepttune/ajaxselect - 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. [Templating &amp; Views](/categories/templating)
4. /
5. nepttune/ajaxselect

ActiveLibrary[Templating &amp; Views](/categories/templating)

nepttune/ajaxselect
===================

Ajax-filled selectbox for nette forms.

v2.4.3(3y ago)22.1k11MITPHP

Since Jan 13Pushed 3y ago1 watchersCompare

[ Source](https://github.com/infinityloop-dev/ajaxselect)[ Packagist](https://packagist.org/packages/nepttune/ajaxselect)[ Docs](https://www.peldax.com)[ RSS](/packages/nepttune-ajaxselect/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (2)Versions (19)Used By (1)

Ajaxselect
==========

[](#ajaxselect)

🔧 Ajax-filled selectbox for nette forms.

[![Packagist](https://camo.githubusercontent.com/78441adfad926a2e801ee16d5b4c0779402f78a73031212ee8ff157f4b9a9341/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e65707474756e652f616a617873656c6563742e737667)](https://camo.githubusercontent.com/78441adfad926a2e801ee16d5b4c0779402f78a73031212ee8ff157f4b9a9341/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e65707474756e652f616a617873656c6563742e737667)[![Packagist](https://camo.githubusercontent.com/ccbadd02262da5318410ff6509ef1f4159a9f0b43262c4a24febffe0f0d9376f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e65707474756e652f616a617873656c6563742e737667)](https://camo.githubusercontent.com/ccbadd02262da5318410ff6509ef1f4159a9f0b43262c4a24febffe0f0d9376f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e65707474756e652f616a617873656c6563742e737667)![CommitsSinceTag](https://camo.githubusercontent.com/7b99d82914ad5635d09e0116801a5c8a447b197193fbec5f40e27bf9fd3900c7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6d6d6974732d73696e63652f6e65707474756e652f616a617873656c6563742f76312e302e7376673f6d61784167653d363030)

[![Code Climate](https://camo.githubusercontent.com/ce9f9a36362879f0406e0caad1d61d893719f5847d038d3be9116bcf35dc0175/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6e65707474756e652f616a617873656c6563742f6261646765732f6770612e737667)](https://codeclimate.com/github/nepttune/ajaxselect)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/70ec633104fc5a6414aac173e1e684996cba3158a9e6188ea20efb57f537c563/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e65707474756e652f616a617873656c6563742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/nepttune/ajaxselect/?branch=master)

Introduction
------------

[](#introduction)

This extension provides easy to use ajax-driven selectbox.

Dependencies
------------

[](#dependencies)

- [nepttune/base-requirements](https://github.com/nepttune/base-requirements)

How to use
----------

[](#how-to-use)

- Register `\Nepttune\DI\AjaxSelectExtension` as nette extension.
- Use `addAjaxSelect` or `addAjaxMultiSelect` in your forms.

### Example configuration

[](#example-configuration)

```
extensions:
    ajaxSelect: Nepttune\DI\AjaxSelectExtension

```

### Example form

[](#example-form)

```
$form->addAjaxSelect('client_id', 'Klient', function (string $query, ?int $default = 0) {
      if ($default) {
          $row = $this->repository->getRow($default);
          return [$row->id => $row->name];
      }

      return $this->repository->search($query);
  })
  ->setPrompt('--- Vyberte ---')
  ->setRequired();
```

Parameter `$query` contains text being searched, parametered `$default` contains value which is set as default (for example when editing existing entry, you need to provide saved key =&gt; value in your callback).

### Javascript snippet using select2

[](#javascript-snippet-using-select2)

```
if ($(this).data('ajaxselect')) {
    $(this).select2({
        tokenSeparators: [',', ' '],
        ajax: {
            url: $(this).data('ajaxselect'),
            delay: 250,
            dataType: 'json',
            data: function (params) {
                return {
                    q: params.term
                };
            },
            processResults: function (data, params) {
                var result = [];
                $.each(data, function (key, value) {
                    result.push({
                        id: key,
                        text: value
                    });
                });
                return {
                    results: result
                };
            }
        }
    });
}
```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 87.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~88 days

Recently: every ~233 days

Total

17

Last Release

1306d ago

Major Versions

v1.0.2 → v2.02019-04-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/00654c913028f8d25a226eb2ddf368e1b999bf72fa4f77dbd1449c1df218756c?d=identicon)[peldax](/maintainers/peldax)

---

Top Contributors

[![peldax](https://avatars.githubusercontent.com/u/10790033?v=4)](https://github.com/peldax "peldax (36 commits)")[![vossik](https://avatars.githubusercontent.com/u/22434658?v=4)](https://github.com/vossik "vossik (5 commits)")

---

Tags

ajaxajaxselectformnettephp

### Embed Badge

![Health badge](/badges/nepttune-ajaxselect/health.svg)

```
[![Health](https://phpackages.com/badges/nepttune-ajaxselect/health.svg)](https://phpackages.com/packages/nepttune-ajaxselect)
```

###  Alternatives

[ublaboo/datagrid

DataGrid for Nette Framework: filtering, sorting, pagination, tree view, table view, translator, etc

2972.0M24](/packages/ublaboo-datagrid)[contributte/forms-bootstrap

Nette extension for Bootstrap forms

221.1M4](/packages/contributte-forms-bootstrap)[tomaj/nette-bootstrap-form

Nette bootstrap form renderer

28450.6k8](/packages/tomaj-nette-bootstrap-form)[nextras/forms-rendering

Rendering helpers for Nette Framework Forms.

16102.5k2](/packages/nextras-forms-rendering)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
