PHPackages                             jhhb01/silverstripe\_ajax\_dropdown - 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. jhhb01/silverstripe\_ajax\_dropdown

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

jhhb01/silverstripe\_ajax\_dropdown
===================================

Use Ajax in Dropdowns for large datasets

017PHP

Since Feb 9Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/jhhb01/silverstripe_ajax_dropdown)[ Packagist](https://packagist.org/packages/jhhb01/silverstripe_ajax_dropdown)[ RSS](/packages/jhhb01-silverstripe-ajax-dropdown/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

silverstripe-ajax-dropdown
==========================

[](#silverstripe-ajax-dropdown)

An silverstripe dropdown which loads results via ajax to handle large datasets

Example usage (I'll document this better later)
-----------------------------------------------

[](#example-usage-ill-document-this-better-later)

```
// Define a callback to load the results, don't worry about pagination of limiting here
$dataSource = function ($term = null) {
    return SomeDataObject::get()->filter(['Title:PartialMatch' => $term]);
};

// Here ID and Title are optional as they are the defaults, they are the names of the columns to
// pull the ID and Text of the dropdown option from
$field = AjaxDropdownField::create('LabelID', 'Label', 'ID', 'Title');

// This is the only required function call, of course feel free to just chain this on after ::create(...)
$field->setSource($dataSource);

// These methods are totally optional, I'm going to call them with their defaults below
$field->setIDColumn('ID');      // Set the name of the column to pull the dropdown options ID from
$field->setTextColumn('Title'); // Set the name of the column to pull the dropdown options text from
$field->setMinLength(1);        // Set the number of characters that must be entered before a search will be performed
$field->setPageLength(150);     // Set the number of results that will be returned on each search or "load more"
// Each of the above methods also has an associated "getter" e.g. $field->getPageLength();
```

Other Methods
-------------

[](#other-methods)

This field extends `DropdownField` so any methods you can call on there e.g. `setEmptyString()` will also work here.

Other Modules
-------------

[](#other-modules)

This field should work with most other modules, I have explicitly tested this with [sheadawson/silverstripe-quickaddnew](https://github.com/sheadawson/silverstripe-quickaddnew)

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance51

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/80675568?v=4)[jhhb01](/maintainers/jhhb01)[@jhhb01](https://github.com/jhhb01)

---

Top Contributors

[![jhhb01](https://avatars.githubusercontent.com/u/80675568?v=4)](https://github.com/jhhb01 "jhhb01 (8 commits)")

### Embed Badge

![Health badge](/badges/jhhb01-silverstripe-ajax-dropdown/health.svg)

```
[![Health](https://phpackages.com/badges/jhhb01-silverstripe-ajax-dropdown/health.svg)](https://phpackages.com/packages/jhhb01-silverstripe-ajax-dropdown)
```

###  Alternatives

[phpstan/php-8-stubs

PHP stubs extracted from php-src

316.7M6](/packages/phpstan-php-8-stubs)[spatie/sidecar-shiki

Run Shiki highlighting with Sidecar

3710.2k](/packages/spatie-sidecar-shiki)

PHPackages © 2026

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