The module comes with 2 fields that have autocomplete enabled by default.
It looks like any field should be able to be set up as an autocomplete field but I can't seem to get that working.

What I expected was that I would be able to
Select "Autocomplete" as the Field type on admin/structure/types/manage/page/fields/node.page.field_name
Check "Autocomplete sources" on admin/structure/types/manage/page/fields/node.page.field_name/storage
And see a new auto comlete options field for that field.

The Note says "At least one value must be selected before you can enable the autocomplete option on the input textfields." but I am not sure what that means.

Admin UI screenshot

CommentFileSizeAuthor
Screen Shot 2016-11-14 at 1.31.03 AM.png162.91 KBchrowe

Issue fork name-2827001

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

chrowe created an issue. See original summary.

chrowe’s picture

Issue summary: View changes
alan d.’s picture

Category: Bug report » Support request

I haven't actually tried, but check out Drupal\name\NameOptionsProvider and likely an alter on the field settings

    $settings = $field->getFieldStorageDefinition()->getSettings();
    foreach ($this->allComponents as $component) {
      if (!isset($settings['autocomplete_source'][$component])) {
        $settings['autocomplete_source'][$component] = array();
      }
      $settings['autocomplete_source'][$component] = array_filter($settings['autocomplete_source'][$component]);
    }
bluegeek9’s picture

Component: Documentation » Code
Assigned: Unassigned » bluegeek9
Category: Support request » Feature request

  • bluegeek9 committed 96e6cd18 on 8.x-1.x
    feat: #2827001 Enable Autocomplete sources for any field
    
bluegeek9’s picture

Assigned: bluegeek9 » Unassigned
Status: Active » Fixed
//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support makes this project sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • bluegeek9 committed 02ef2aec on 8.x-1.x
    feat: #2827001 Enable Autocomplete sources for any field
    
jcandan’s picture

Status: Fixed » Needs work

This change introduced new configuration schema. I believe this calls for a hook_update_N() . See https://www.drupal.org/docs/drupal-apis/update-api/updating-configuration.

Though the addition is not a breaking change, to be captured in already installed instances with Name enabled, they'll need an update to capture the added schema keys.

bluegeek9 changed the visibility of the branch 8.x-1.x to hidden.

bluegeek9’s picture

Assigned: Unassigned » bluegeek9
Status: Needs work » Active

bluegeek9’s picture

Version: 8.x-1.0-beta1 » 8.x-1.x-dev
Assigned: bluegeek9 » Unassigned
Status: Active » Needs review

  • bluegeek9 committed b2955733 on 8.x-1.x
    feat: #2827001 Enable Autocomplete sources for any field
    
bluegeek9’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.