Problem/Motivation

Steps to reproduce

  1. Create a simple form with composite items
    co_author_editor_translator_1:
      '#type': webform_name
      '#title': Co-Author/Editor/Translator_1
      '#title_display': ''
      '#wrapper_type': container
      '#title__access': false
      '#first__title': 'Given /First Name'
      '#middle__access': false
      '#last__title': 'Surname/Last Name'
      '#suffix__access': false
      '#degree__access': false
    co_author_editor_translator_2:
      '#type': webform_name
      '#title': Co-Author/Editor/Translator_2
      '#title_display': ''
      '#wrapper_type': container
      '#title__access': false
      '#first__title': 'Given /First Name'
      '#middle__access': false
      '#last__title': 'Surname/Last Name'
      '#suffix__access': false
      '#degree__access': false
    
  2. Submit the form, filling out information in one of the items and not any information in the other item.
  3. Expected result.

    1 column in the spreadsheet for each subfield of the two controls.

    title1 first1 middle1 last1 degree1 other1            

    Actual result.

    1 column in the spreadsheet for each of subfield of the populated control and 1 column total for the unpopulated control.

    title1 first1 middle1 last1 degree1 other1  

    Proposed resolution

    Add logic to handle empty composite properly.

    Remaining tasks

    User interface changes

    API changes

    Data model changes

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

kwfinken created an issue. See original summary.

kwfinken’s picture

Status: Active » Needs review
dieterholvoet’s picture

Status: Needs review » Reviewed & tested by the community

I tested the MR and it fixes the issue.

dieterholvoet’s picture

Title: Composite elements that are left empty use too few columns. » Composite elements that are left empty use too few columns

dieterholvoet’s picture

Status: Reviewed & tested by the community » 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.