Problem/Motivation

Requesting the support for autocomplete fields (at least for the parent entity). If the data-set is very large, <select> widgets aren't an option due to very slow loading and timeouts.

Curious if this request would require a massive overhaul of the module. Thoughts?

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

chucksimply created an issue. See original summary.

chucksimply’s picture

Issue summary: View changes
chucksimply’s picture

There is a patch for Business Rules here... https://www.drupal.org/project/business_rules/issues/3207050. Since Dependent Fields is heavily based off the Business Rules module, wondering if this BR patch can be leveraged to create a solution.

chucksimply’s picture

Status: Active » Needs review
StatusFileSize
new3.64 KB

Okay, created a patch based on #3. Works on my end (tested as parent - autocomplete, child - select). Drupal 9.4.7. Please review.

chucksimply’s picture

StatusFileSize
new3.68 KB

Updated patch supporting Choices Autocomplete module. Though it's noted in this issue, the patch should be targeting the field type, not the element type. So there's likely room for improvement.

https://www.drupal.org/project/choices_autocomplete/issues/3331047

pcambra’s picture

Issue tags: +Needs tests
pearls’s picture

#5 works with Choices Autocomplete. Thanks for patch.
However, it controls after the selection and prevents the entity from being saved with a warning.
It is better to prevent selection when selecting an item that does not belong to the dependent list.

pcambra’s picture

Status: Needs review » Needs work

NW as per #6 and #7

shenron_segamag’s picture

Also working for me on D9.

qusai taha’s picture

StatusFileSize
new4.56 KB

Re-roll the patch to make sure the select list is updated when values are removed from the autocomplete field.

qusai taha’s picture

StatusFileSize
new1.48 KB
qusai taha’s picture

Status: Needs work » Needs review
StatusFileSize
new50.03 KB

Patch to enable dependent fields with autocomplete functionality and support autocomplete fields.

qusai taha’s picture

StatusFileSize
new49.49 KB
qusai taha’s picture

StatusFileSize
new56.04 KB

Add support for AutocompleteDeluxe

qusai taha’s picture

StatusFileSize
new57.23 KB
qusai taha’s picture

StatusFileSize
new56.87 KB

Updated the patch to make it more dynamic, with AJAX support and selectors for the forms.