UX Improvement: Present fields for export in checkboxes instead of multiselect

Created on 13 May 2025, 3 months ago

Problem/Motivation

The UX of multiselect fields is notoriously poor. We had a request to migrate the CSV export form to checkboxes and, ultimately, it did not appear to be that difficult.

Note:

  • We originally just switched the fields #type from select to checkboxes, but that introduced a fatal error when submitting the form:
    InvalidArgumentException: Field 0 is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField() (line 616 of core/lib/Drupal/Core/Entity/ContentEntityBase.php).
    
    Drupal\Core\Entity\ContentEntityBase->get() (Line: 267)
    Drupal\content_export_csv\ContentExport->getData() (Line: 205)
    Drupal\content_export_csv\ContentExport->getNodeData() (Line: 108)
    Drupal\content_export_csv\ContentExport->getNodeDataList() (Line: 244)
    Drupal\content_export_csv\ContentExport->getNodeCsvData() (Line: 176)
    Drupal\content_export_csv\Form\ContentExportForm->submitForm()
    
  • We introduced a small fix to remove empty fields before invoking getNodeCsvData().
✨ Feature request
Status

Needs review

Version

4.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States kmonty San Francisco, CA & Berlin, DE

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024