Make difference between selecting existing and creating a new entity as clear as possible

Created on 24 August 2024, 3 months ago

Problem/Motivation

The default behavior where the submit buttons seem to be synonyms can be confusing.

Proposed resolution

Use "Select/Reference existing" and "Create new" to make the difference clear, and drop redundant titles.

User interface changes

That's the change.

API changes

None.

Data model changes

None.

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mlncn
    • mlncn β†’ committed 8010dd19 on 1.0.x
      Issue #3470026 by mlncn: Make difference between selecting existing and...
  • Status changed to Needs review 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

  • πŸ‡ΊπŸ‡ΈUnited States stephen Verdant

    This change works β€”but overwrote my changes via hook_inline_entity_form_reference_form_alter

    I think what is happening:

    class InlineEntityFormComplexOpen
      public function formElement
        $element['form'] += inline_entity_form_reference_form($element['form'], $form_state);
      

    which calls

      \Drupal::moduleHandler()->alter('inline_entity_form_reference_form', $reference_form, $form_state);
    
    

    ... and then after the alter this #value is set where it can't be changed...

    
    $element['form']['actions']['ief_reference_save']['#value'] = ...
    

    I'm not sure the best way to keep the code concise β€” maybe use hook_inline_entity_form_reference_form for the potential-conflict variables?

Production build 0.71.5 2024