You are here

README.txt in Autocomplete Deluxe 7.2

Same filename and directory in other branches
  1. 8 README.txt
  2. 7 README.txt
CONTENTS OF THIS FILE
---------------------

* Introduction
* Requirements
* Installation
* Configuration
* FAQ
* Maintainers


INTRODUCTION
------------

The Autocomplete Deluxe module is an enhanced autocomplete element that uses the
JQuery UI autocomplete. It will also implement a widget for taxonomy. This
module does not require any 3rd party jQuery libraries.

 * For a full description of the module visit
   https://www.drupal.org/project/autocomplete_deluxe

 * To submit bug reports and feature suggestions, or to track changes visit
   https://www.drupal.org/project/issues/autocomplete_deluxe


REQUIREMENTS
------------

This module requires no modules outside of Drupal core.


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

Install the Autocomplete Deluxe module as you would normally install a
contributed Drupal module. Visit
https://drupal.org/documentation/install/modules-themes/modules-7 for further
information.


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

To set up a field named Tags which uses an Autocomplete Deluxe widget to set
values for that field from the Tags taxonomy, do the following:

 * Navigate to Administration > Modules and enable the Autocomplete Deluxe
   module.
 * Navigate to Administration  > Structure > Content types and select manage
   fields of the content type you wish to edit.
 * Add a new field of "Term reference" named "Tags". Select the Widget Type
   "Autocomplete Deluxe" in the drop down menu. Save.
 * Select the Tags vocabulary.  Save field settings.
 * Customize or keep the default Autocomplete Deluxe settings for the field.
   Save settings.

Now when new content is added the Tags widget allows editors to enter
existing tags as well as create new ones.


FAQ
---

Q: Can I use the Autocomplete Deluxe widget as a Views exposed filter?

A: Why yes, yes you can!  First, add the field as a traditional exposed
   Autocomplete filter in your view.  Then, create a custom module (see
   https://www.drupal.org/docs/7/creating-custom-modules if you have
   never written a module before), where your .module file contains
   something like the following:

```
   function MY_MODULE_form_alter(&$form, &$form_state, $form_id) {
     if ($form_id == 'views_exposed_form' &&
       $form_state['view']->name == '<my view name>') {
       $form['<my field machine name>_tid'] = array(
         '#type' => 'autocomplete_deluxe',
         '#autocomplete_deluxe_path' => url('autocomplete_deluxe/taxonomy/<my
           field machine name>', array('absolute' => TRUE)),
         '#multiple' => TRUE,
         '#autocomplete_min_length' => 0,
         '#autocomplete_multiple_delimiter' => ',',
         '#not_found_message' => "The term '@term' will be added.",
       );
     }
   }
```

   So if you have a view with the machine name 'list_articles', and you want
   to provide an exposed Autocomplete Deluxe filter for a field with the
   machine name 'field_term_ref', the code becomes:

```
   function MY_MODULE_form_alter(&$form, &$form_state, $form_id) {
     if ($form_id == 'views_exposed_form' &&
       $form_state['view']->name == 'list_articles') {
       $form['field_term_ref_tid'] = array(
         '#type' => 'autocomplete_deluxe',
         '#autocomplete_deluxe_path' => url(
           'autocomplete_deluxe/taxonomy/field_term_ref',
           array('absolute' => TRUE)
         ),
         '#multiple' => TRUE,
         '#autocomplete_min_length' => 0,
         '#autocomplete_multiple_delimiter' => ',',
         '#not_found_message' => "The term '@term' will be added.",
       );
     }
   }
```


MAINTAINERS
-----------

Current maintainers:

 * Edward Chan (edwardchiapet) - https://www.drupal.org/u/edwardchiapet
 * Lee Nakamura (LNakamura) - https://www.drupal.org/u/lnakamura

Active support and ongoing development by Mediacurrent -
http://www.mediacurrent.com/

For additional information, see the project page on Drupal.org
<https://www.drupal.org/project/autocomplete_deluxe>

File

README.txt
View source
  1. CONTENTS OF THIS FILE
  2. ---------------------
  3. * Introduction
  4. * Requirements
  5. * Installation
  6. * Configuration
  7. * FAQ
  8. * Maintainers
  9. INTRODUCTION
  10. ------------
  11. The Autocomplete Deluxe module is an enhanced autocomplete element that uses the
  12. JQuery UI autocomplete. It will also implement a widget for taxonomy. This
  13. module does not require any 3rd party jQuery libraries.
  14. * For a full description of the module visit
  15. https://www.drupal.org/project/autocomplete_deluxe
  16. * To submit bug reports and feature suggestions, or to track changes visit
  17. https://www.drupal.org/project/issues/autocomplete_deluxe
  18. REQUIREMENTS
  19. ------------
  20. This module requires no modules outside of Drupal core.
  21. INSTALLATION
  22. ------------
  23. Install the Autocomplete Deluxe module as you would normally install a
  24. contributed Drupal module. Visit
  25. https://drupal.org/documentation/install/modules-themes/modules-7 for further
  26. information.
  27. CONFIGURATION
  28. -------------
  29. To set up a field named Tags which uses an Autocomplete Deluxe widget to set
  30. values for that field from the Tags taxonomy, do the following:
  31. * Navigate to Administration > Modules and enable the Autocomplete Deluxe
  32. module.
  33. * Navigate to Administration > Structure > Content types and select manage
  34. fields of the content type you wish to edit.
  35. * Add a new field of "Term reference" named "Tags". Select the Widget Type
  36. "Autocomplete Deluxe" in the drop down menu. Save.
  37. * Select the Tags vocabulary. Save field settings.
  38. * Customize or keep the default Autocomplete Deluxe settings for the field.
  39. Save settings.
  40. Now when new content is added the Tags widget allows editors to enter
  41. existing tags as well as create new ones.
  42. FAQ
  43. ---
  44. Q: Can I use the Autocomplete Deluxe widget as a Views exposed filter?
  45. A: Why yes, yes you can! First, add the field as a traditional exposed
  46. Autocomplete filter in your view. Then, create a custom module (see
  47. https://www.drupal.org/docs/7/creating-custom-modules if you have
  48. never written a module before), where your .module file contains
  49. something like the following:
  50. ```
  51. function MY_MODULE_form_alter(&$form, &$form_state, $form_id) {
  52. if ($form_id == 'views_exposed_form' &&
  53. $form_state['view']->name == '') {
  54. $form['_tid'] = array(
  55. '#type' => 'autocomplete_deluxe',
  56. '#autocomplete_deluxe_path' => url('autocomplete_deluxe/taxonomy/
  57. field machine name>', array('absolute' => TRUE)),
  58. '#multiple' => TRUE,
  59. '#autocomplete_min_length' => 0,
  60. '#autocomplete_multiple_delimiter' => ',',
  61. '#not_found_message' => "The term '@term' will be added.",
  62. );
  63. }
  64. }
  65. ```
  66. So if you have a view with the machine name 'list_articles', and you want
  67. to provide an exposed Autocomplete Deluxe filter for a field with the
  68. machine name 'field_term_ref', the code becomes:
  69. ```
  70. function MY_MODULE_form_alter(&$form, &$form_state, $form_id) {
  71. if ($form_id == 'views_exposed_form' &&
  72. $form_state['view']->name == 'list_articles') {
  73. $form['field_term_ref_tid'] = array(
  74. '#type' => 'autocomplete_deluxe',
  75. '#autocomplete_deluxe_path' => url(
  76. 'autocomplete_deluxe/taxonomy/field_term_ref',
  77. array('absolute' => TRUE)
  78. ),
  79. '#multiple' => TRUE,
  80. '#autocomplete_min_length' => 0,
  81. '#autocomplete_multiple_delimiter' => ',',
  82. '#not_found_message' => "The term '@term' will be added.",
  83. );
  84. }
  85. }
  86. ```
  87. MAINTAINERS
  88. -----------
  89. Current maintainers:
  90. * Edward Chan (edwardchiapet) - https://www.drupal.org/u/edwardchiapet
  91. * Lee Nakamura (LNakamura) - https://www.drupal.org/u/lnakamura
  92. Active support and ongoing development by Mediacurrent -
  93. http://www.mediacurrent.com/
  94. For additional information, see the project page on Drupal.org