Problem/Motivation

The UI of the element for a multivalued field is not same as a field with single cardinality.

Steps to reproduce

  1. Add an entity reference field with cardinality 1.
  2. Choose Autocomplete Deluxe as the form widget.
  3. Check the entity form

Screenshot

Proposed resolution

The UI of the element should be consistent

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ✅ Code review by maintainers
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Release notes snippet
  • ✅ Release autocomplete_deluxe-2.0.4

UI interface changes

Unlimited
Unlimited

Limited to one
Limited to one

Limited to 2
Limited to 2

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

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

imalabya created an issue. See original summary.

sandzel’s picture

I can confirm the issue.
One more step should be added:
- The autocomplete deluxe field should have HELP TEXT filled;
- Use Thunder Admin theme

freelylw’s picture

same for the latest 2.03 version here.

sickness29’s picture

Assigned: Unassigned » sickness29
sickness29’s picture

Status: Active » Needs review
StatusFileSize
new9.35 KB

I have removed single widget variant theming and script and made single value field use multiple widget as well.
Also implemented validation for cardinality so now it happens as user adds values and not on form submit which is better from UX standpoint

sickness29’s picture

rajab natshah’s picture

Assigned: sickness29 » Unassigned
Issue tags: -autocomplete_deluxe-2.0.3 +autocomplete_deluxe-2.0.4
rajab natshah’s picture

Title: Autocomplete Deluxe element UI doesn't work for single value field » Fix not working single value field for Autocomplete Deluxe element UI
Version: 2.0.1 » 2.0.x-dev

  • sickness29 committed e38329bf on 2.0.x
    Issue #3273248 by sickness29: Fix not working single value field for...
sickness29’s picture

Status: Needs review » Fixed

I have adjusted the patch a bit to allow users to choose whether they want multiple value design for single value fields and also left single value widget styles and scripts. By default the option is disabled to maintain same behaviour for existing fields.

Status: Fixed » Closed (fixed)

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

rajab natshah’s picture

Assigned: Unassigned » rajab natshah
Status: Closed (fixed) » Needs work

  • rajab natshah committed 085e5c65 on 2.0.x
    Revert "Issue #3273248 by sickness29: Fix not working single value field...
rajab natshah’s picture

Assigned: rajab natshah » Unassigned
Issue tags: -autocomplete_deluxe-2.0.4

Noticed that #multiple was removed
and a new always_multiple was introduced
this will break old sites
Reverted, to have a better logic and updatable direction.

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

I had a 2nd round of testing on the fix from #5.

Thank you, Andrew, I agree with your changes.
With small changes and validation

Tested with

Unlimited
Unlimited

Limited to one
Limited to one

Limited to 2
Limited to 2

rajab natshah’s picture

Issue summary: View changes
StatusFileSize
new26.07 KB

rajab natshah’s picture

Issue summary: View changes
Issue tags: +autocomplete_deluxe-2.0.4
rajab natshah’s picture

Status: Needs work » Needs review
rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

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