Download the PHP package heimrichhannot/contao-form-autocomplete-bundle without Composer

On this page you can find all versions of the php package heimrichhannot/contao-form-autocomplete-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package contao-form-autocomplete-bundle

Contao Form Autocomplete Bundle

This bundle offers functionality for adding the HTML5 attribute autocomplete to form fields in the Contao CMS.

The autocomplete attribute is used in the following cases:

  1. Browsers use it for presenting different autocompletion options for fields wth different autocomplete value set.
  2. Screen readers verbalize it, hence it's a good practice to have them set.

Features

Installation

  1. Install via composer: composer require heimrichhannot/contao-form-autocomplete-bundle.

How does it work?

Form generator

The form generator is supported by default. The autocomplete value is guessed based on the field name. The value is guessed based on the mapping defined in the bundle config. You can extend this mapping in your project (see chapter below).

Dca fields

There are the following supported ways to add the autocomplete value to a field (the priority is descending):

  1. The DCA definition has it set in its eval section:

  2. If no DCA definition is found or relevant in the given context (e.g. in form generator there is no DCA context), the bundle tries to guess based on the mapping of field name to autocomplete value defined in this bundle. You can extend this mapping in your project (see chapter below).

Technical details

Extend the given mapping

Simply add the following code according to your needs to your app/config/config.yml (Contao 4.4) or config/config.yml:

How does the matching of a field name and an autocomplete value work?

The algorithm is currently very simple. Basically it works the following way:

  1. If an autocomplete value is set in the field's DCA, it's used.
  2. The mapping in src/Resources/config/config.yml contains all the currently possible values of the HTML5 autocomplete field. If the field name equals one of these, it's used.
  3. If the step before isn't met, the algorithm iterates the defined synonyms of the autocomplete values. If there's a match, the corresponding autocomplete value is used.
  4. If none of the steps above is met, false is returned.

The comparison only takes into account characters. Special characters and separation characters like - or _ are ignored. Hence a synonym some-name equals someName in this comparison.


All versions of contao-form-autocomplete-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2 || ^8.0
contao/core-bundle Version ^4.9
heimrichhannot/contao-utils-bundle Version ^2.236 || ^3.0
symfony/config Version ^4.4 || ^5.4
symfony/dependency-injection Version ^4.4 || ^5.4
symfony/http-kernel Version ^4.4 || ^5.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package heimrichhannot/contao-form-autocomplete-bundle contains the following files

Loading the files please wait ....