Skip to content

[6.x] Forms 2: Allow choosing which columns to export - #15347

Open
duncanmcclean wants to merge 4 commits into
forms-2from
export-columns
Open

[6.x] Forms 2: Allow choosing which columns to export#15347
duncanmcclean wants to merge 4 commits into
forms-2from
export-columns

Conversation

@duncanmcclean

@duncanmcclean duncanmcclean commented Sep 2, 2026

Copy link
Copy Markdown
Member

This pull request implements the ability to choose which columns are included when exporting form submissions.

Previously, the export modal let you pick a format and whether to export all or filtered submissions, but every export included every field. Now there's a "Columns" section in the modal, with all fields (plus the date) selected by default and a "Select All" / "Deselect All" toggle.

Column selection lives in the modal, rather than on individual exporters, since it's a property of the request in the same way filtering is. The selected columns are passed to the exporter, which decides how to honour them.

Exporters

The base Exporter class gains a columns() helper which returns the selected column handles in form order, defaulting to every field plus date when nothing has been selected. The built-in CSV and JSON exporters use it, and custom exporters can too.

Column selection is opt-in. Custom exporters that honour columns() should override supportsColumnSelection() to return true, otherwise the "Columns" section is hidden when that exporter is chosen. This means existing custom exporters keep working exactly as before.

This PR also extracts the export modal into its own ExportSubmissionsModal component.

Before

CleanShot 2026-09-02 at 13 03 42

After

CleanShot 2026-09-02 at 12 59 56

duncanmcclean and others added 4 commits September 2, 2026 12:57
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HrcGLCVm5ViW18SiRMjhU2
…umn picker

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HrcGLCVm5ViW18SiRMjhU2
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HrcGLCVm5ViW18SiRMjhU2
custom exporters that haven't been updated to honour `columns()` would otherwise show a column picker in the export modal that does nothing. `supportsColumnSelection()` now defaults to `false`, with `CsvExporter` and `JsonExporter` opting in.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U1ZYSJRSdwQj3jU84MMnYU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant