Form builder - ability to archive (trash/hide) form submissions
See original GitHub issueIs your proposal related to a problem?
- The form builder feature is an incredible part of Wagtail that allows for easy to build (by users) forms.
- When a form submission is received, often this gets processed (e.g. contact form) by a team or ‘actioned’, at this point the submission can be deleted but this means it is gone forever.
- The problem is that it would be good to have an ‘archive’ (or similar) where form submissions can be hidden by default but then still accessed if really needed for historic records.
- This would help when looking through a large set of responses to find things that ‘need action’.
Describe the solution you’d like
- AbstractFormSubmission would have a new date field
archived_on
- AbstractFormSubmission would have a new user field
archived_by
- By default, new form submissions would have set the
archived_on
archived_by
fields toNone
- By default, the form submission listing would not show archived, nor would archived form submissions be exported
- The form submission listing would have a button ‘show archived’ at the top, very similar to the ‘show disabled’ in the workflows listing, when clicked the view will change (new URL param) and archived submissions would show, plus there
- The form submission listing would have a button ‘archive’ that shows when a form submission is selected.
- AbstractFormPage should have a class method / attribute of
disable_ability_to_archive
or similar (default beingFalse
), if this isTrue
the functionality of showing archived submission (including ability to archive) should be hidden from the user. It is possible the name / default could be reversed so that only opt-in is used for this new feature. This also avoids another ‘setting’ added for this. - When showing archived listings, there should be a way to un-archive a form response, this option should appear when an archived response is checked.
- There should be a class method on
AbstractFormSubmission
ORAbstractFormPage
to do this change on the submission, this helps when wanting to customise the behaviour (trigger an email for example) of when something is archived or un-archived.
Reference - workflows with show disabled button
Describe alternatives you’ve considered
- This can be built with a customisation without too many issues, migrating lots of existing form pages to this would be a bit complex as changed models may be needed though.
- Archive may not be the best approach, maybe a
starred
type field orflagged
would be more suitable, with the ability for this to be defaulted (although, this creates a more complex set of interactions to consider).
Additional context
These three form builder solutions do NOT provide this functionality, which may indicate that it is not useful
- JotForms allows deletion but not ‘archive’ https://www.jotform.com/answers/1717595-how-can-i-archive-old-form-responses
- Google allows deletion but not ‘archive’ https://support.google.com/docs/answer/2917686?hl=en#zippy=%2Cdelete-individual-responses
- Typeform does not allow undelete https://www.typeform.com/help/a/what-happens-to-deleted-results-typeforms-and-accounts-360040196472/
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Advanced Custom Fields: Extended – WordPress plugin
Add an Archive Option Page under the Post Type admin menu. Display and save any field ... Manage Advanced ACF Forms from the...
Read more >Extended - Awesome ACF
Manage Advanced ACF Forms from the WordPress administration. This module is an enhanced version of the native ACF Form feature.
Read more >Full text of "PC World" - Internet Archive
Keep submissions brief ( Power Tips to 100 words or less); accepted submissions will be ... Fur¬ thermore, years of testing at PC...
Read more >Untitled
Suzuki new estilo 2012, Elementary s01e07 kat, Power trip live j cole, ... Luka sabbat complex, Jsf submit button outside form, 2014 cbr...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It may even be worthwhile doing a first round PR that has the underlying archive functionality of restrictions to the default listing, adds the fields to abstract form page, adds a new method to archive / un-archive.
Unit tests and functionality for that will be heaps and will be useful.
Then add the UI buttons as a seperate PR
I am working on this one