PHPackages                             clesson-de/silverstripe-autocomplete - 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. clesson-de/silverstripe-autocomplete

ActiveSilverstripe-vendormodule[Utility &amp; Helpers](/categories/utility)

clesson-de/silverstripe-autocomplete
====================================

Silverstripe CMS module providing an autocomplete form field with model- or callback-based suggestions.

1.0.0(2mo ago)0912BSD-3-ClausePHPPHP ^8.1

Since May 8Pushed 2mo agoCompare

[ Source](https://github.com/clesson-de/silverstripe-autocomplete)[ Packagist](https://packagist.org/packages/clesson-de/silverstripe-autocomplete)[ RSS](/packages/clesson-de-silverstripe-autocomplete/feed)WikiDiscussions dev Synced 1w ago

READMEChangelogDependencies (2)Versions (2)Used By (2)

silverstripe-autocomplete
=========================

[](#silverstripe-autocomplete)

A Silverstripe module providing `AutocompleteField`, a form field with async autocomplete suggestions.

Features
--------

[](#features)

- Suggestion source via **DataObject class + property**
- Suggestion source via **callback callable**
- Lightweight vanilla JS dropdown UI

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

[](#installation)

```
composer require clesson-de/silverstripe-autocomplete
composer vendor-expose
```

Usage
-----

[](#usage)

```
use Clesson\Silverstripe\Autocomplete\Forms\AutocompleteField;

// 1) Model + property source
$cityField = AutocompleteField::create('City', 'City')
    ->setSourceModel(\App\Models\Address::class, 'City')
    ->setLimit(8)
    ->setMinChars(2);

// 2) Callback source
$streetField = AutocompleteField::create('Street', 'Street')
    ->setSourceCallback([\App\Services\AddressService::class, 'searchStreetNames'])
    ->setLimit(10);

$fields->addFieldsToTab('Root.Main', [$cityField, $streetField]);
```

### Callback contract

[](#callback-contract)

Your callback receives the entered query string and must return an array of strings.

```
public static function searchStreetNames(string $query): array
{
    if ($query === '') {
        return [];
    }

    return [
        'Main Street',
        'Market Street',
    ];
}
```

API endpoint
------------

[](#api-endpoint)

`GET /autocomplete-api/search`

Request parameters are set automatically by `AutocompleteField`.

License
-------

[](#license)

BSD-3-Clause

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance86

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

78d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/52702628?v=4)[Clesson](/maintainers/clesson-de)[@clesson-de](https://github.com/clesson-de)

---

Top Contributors

[![clesson-de](https://avatars.githubusercontent.com/u/52702628?v=4)](https://github.com/clesson-de "clesson-de (2 commits)")

### Embed Badge

![Health badge](/badges/clesson-de-silverstripe-autocomplete/health.svg)

```
[![Health](https://phpackages.com/badges/clesson-de-silverstripe-autocomplete/health.svg)](https://phpackages.com/packages/clesson-de-silverstripe-autocomplete)
```

###  Alternatives

[silverstripe/cms

The SilverStripe Content Management System

5253.6M1.4k](/packages/silverstripe-cms)[symbiote/silverstripe-advancedworkflow

Adds configurable workflow support to the CMS, with a GUI for creating custom workflow definitions.

46302.4k9](/packages/symbiote-silverstripe-advancedworkflow)[silverstripe/userforms

UserForms enables CMS users to create dynamic forms via a drag and drop interface and without getting involved in any PHP code

1321.1M86](/packages/silverstripe-userforms)[dnadesign/silverstripe-elemental

Elemental pagetype and collection of Elements

1101.1M315](/packages/dnadesign-silverstripe-elemental)[silverstripe/sharedraftcontent

Share draft page content with non-CMS users

21424.1k12](/packages/silverstripe-sharedraftcontent)

PHPackages © 2026

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