PHPackages                             peci1/suggestinput - 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. peci1/suggestinput

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

peci1/suggestinput
==================

Dynamic suggester for text fields.

v2.1.1(12y ago)4183BSD-3-ClausePHPPHP &gt;= 5.3.0

Since Apr 21Pushed 12y ago1 watchersCompare

[ Source](https://github.com/peci1/Nette-SuggestInput)[ Packagist](https://packagist.org/packages/peci1/suggestinput)[ Docs](https://github.com/peci1/suggestinput)[ RSS](/packages/peci1-suggestinput/feed)WikiDiscussions master Synced 3d ago

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

SUGGEST INPUT NETTE TUTORIAL
============================

[](#suggest-input-nette-tutorial)

This tutorial is for Nette framework users, the others must adjust it for their needs.

This version works with Nette 2.1. There are older version working with Nette 2.0 and 0.9, too. Just check  .

INSTALLATION
============

[](#installation)

Just copy /libs/SuggestInput, /www/js and /www/css to your nette project

File list:

```
/app
     /presenters
         SuggesterTestPresenter.php - an example presenter showing the usage
     /templates
         /SuggesterTest
             default.phtml
/libs       //You can copy this libs dir everywhere in your project
    /SuggestInput
        SuggestInput.php
        license.txt
        /Suggesters
            ISuggester.php
            ArraySuggester.php
            DbSuggester.php
            ConstantSuggester.php
        /docs - this help :) and other help files - you don't need to copy them
/www
     /js
         jquery.suggest.js
         jquery.bgiframe.js
         suggestInput.js
     /css
         suggest.css

```

If you do not use RobotLoader, you need to include SuggestInput.php to your program.

Don't forget to call

```
Nette\Forms\Form::extensionMethod('Nette\Forms\Form::addSuggestInput', 'Nette\Addons\SuggestInput::addSuggestInput');

```

from your bootstrap or `BasePresenter::__construct()`.

Include the following JS libraries in the page layout (in the order as follows):

- jQuery 1.10
- jQuery.bgiframe 3.0 (included in package)
- jQuery.suggest 1.2 modified for SuggestInput (included in package)
- netteForms.js (part of Nette 2.0)
- suggestInput.js (included in package) And include the sample css file in the page layout
- suggest.css

USING SUGGEST INPUT
===================

[](#using-suggest-input)

You will need a presenter's action returning the suggested items as JSON array (they are loaded via AJAX (or, better AJAJ - Asynchonous Javascript And JSON))

So you will need a suggester object - the object that searches some "blackbox" and returns the matching items. The same suggester should be used in the action and should be given to the control (if you need to give one).

You can choose from 3 predefined suggesters:

- ArraySuggester - you provide an array of items and the suggester searches the array for matching items
- DbSuggester - searches a database table for matching items (uses Nette\\Database)
- ConstantSuggester - always suggests the same items (provided as array) Or you can write your own suggester, but then please implement ISuggester

THE SIMPLEST CASE
=================

[](#the-simplest-case)

In the simplest case you just call

```
->addSuggestInput('uniqueId', 'Label', $this->link('suggest'))

```

on a Form you create.

This supposes you create an action called `actionSuggest()`. The action uses a suggester, which you can create in the component factory `createComponentSuggester()`.

See the example presenter for more examples.

LIVE DEMO
=========

[](#live-demo)

You can try out a live demo at

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

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

4406d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/182533?v=4)[Martin Pecka](/maintainers/peci1)[@peci1](https://github.com/peci1)

---

Top Contributors

[![peci1](https://avatars.githubusercontent.com/u/182533?v=4)](https://github.com/peci1 "peci1 (15 commits)")

### Embed Badge

![Health badge](/badges/peci1-suggestinput/health.svg)

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

###  Alternatives

[vojtech-dobes/nette-forms-gpspicker

Google Maps based picker of coordinates for Nette Framework.

2456.6k](/packages/vojtech-dobes-nette-forms-gpspicker)[jkuchar/multiplefileupload

Multiple upload form control for Nette framework.

104.4k1](/packages/jkuchar-multiplefileupload)

PHPackages © 2026

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