PHPackages                             hatchvenom/jquerytypeaheadbundle - 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. hatchvenom/jquerytypeaheadbundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

hatchvenom/jquerytypeaheadbundle
================================

This bundle provides a typeahead form input to your symfony forms based on Twitter Typeahead - Based on Mathieu Muller's version, just omitted the jquery dependancy.

v1.0(11y ago)06MITPHP

Since May 20Pushed 10y ago1 watchersCompare

[ Source](https://github.com/SlimBN/JqueryTypeAheadBundle)[ Packagist](https://packagist.org/packages/hatchvenom/jquerytypeaheadbundle)[ RSS](/packages/hatchvenom-jquerytypeaheadbundle/feed)WikiDiscussions master Synced 1mo ago

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

MATM TYPEAHEADBUNDLE
====================

[](#matm-typeaheadbundle)

This bundle provides a typeahead form input to your symfony forms based on Twitter Typeahead - Based on Mathieu Muller's version, just omitted the jquery dependancy.

INSTALLATION
------------

[](#installation)

With composer, add the following line to your composer.json

```
{
    "require": {
        "slim/typeaheadbundle": "dev-master"
    }
}

```

And don't forget to enable it in you kernel

```
// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        //...
        new MatM\Bundle\TypeAheadBundle\MatMTypeAheadBundle(),
        //...

```

CONFIGURATION
-------------

[](#configuration)

In your config.yml file just add these lines

```
# app/config/config.yml
twig:
    form:
        resources:
            - 'MatMTypeAheadBundle:Form:typeahead-form-theme.html.twig'
...
framework:
    templating:
        packages:
        cdnjs:
            base_urls:
                http: ['https://cdnjs.cloudflare.com/ajax/libs/']

```

FILES TO INCLUDE
----------------

[](#files-to-include)

In your base.html.twig file (or equivalent), just include default stylesheet (or you can create your own) :

```
{% stylesheets 'bundles/matmtypeahead/css/typeahead.css' %}

{% endstylesheets %}

```

typeahead bundle js files :

```

{% javascripts "@MatMTypeAheadBundle/Resources/public/js/TypeAhead/TypeAheadBundle.js" %}

{% endjavascripts %}

```

USAGE
-----

[](#usage)

In your controller action request your entity repository as you need, then call typeahead dataset maker with your results and choose which properties of your entity you want to use for the search and the display

```
// $results = the results of your own query
// "search_method" = the method of your target entity you want to use for the search
// "display_method" = the method of your target entity you want to use for the display
$list = $this->get("matm.dataset_maker")->makeTypeAheadDataset($results, "search_method", "display_method");

```

Then pass the list to your template

```
return $this->render(
    'MyBundle:MyController:my_template.html.twig',
    array(
        'form' => $form->createView(),
        'list' => $list
    )
);

```

And finally create a JS variable with it in your template

```
{% block javascripts %}

         var list = {{ list | json_encode | raw }};

{% endblock %}

```

In a JS file declare a document ready :

```
//list : your data list
//dataset_name : choose a name for your dataset
//#my_form_input_id : the id of the form input
// onSelectFunction : not mandatory->the function you wish to execute on value selection
$(document).ready(function(){
    TypeAheadBundle.typeAheadProcessor(list, "#my_form_input_id", onSelectFunction);
});

```

Now all you need to do is to call the typeahead input in your form buider class

```
$builder->add(
    'myProperty',
    'typeahead',
    array(
        "data_class" => 'Path\ToMy\Bundle\Entity\MyEntity',
        'label'    => 'my_label',
        'attr' => array("display" => "name"), //the property to display in case of hydrated form
    )
)

```

You can also use the widget even if you are not using it in a symfony form including it in your twig template

```
{% include "MatMTypeAheadBundle::matm_typeahead.html.twig" with {id: "choose_an_id", placeholder: 'choose_a_placeholder')} %}

```

Et voilà!

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

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

4016d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e318252104cca1ea1f78a7a091300dda1a8390743acb668545cc0e59f007f3f0?d=identicon)[hatchvenom](/maintainers/hatchvenom)

---

Top Contributors

[![mathieu-uppler](https://avatars.githubusercontent.com/u/59790615?v=4)](https://github.com/mathieu-uppler "mathieu-uppler (103 commits)")[![mathieu-axiocode](https://avatars.githubusercontent.com/u/10495120?v=4)](https://github.com/mathieu-axiocode "mathieu-axiocode (2 commits)")

---

Tags

typeahead autocomplete symfony form twitter

### Embed Badge

![Health badge](/badges/hatchvenom-jquerytypeaheadbundle/health.svg)

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

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

555.8M69](/packages/symfony-ux-icons)

PHPackages © 2026

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