code4romania / code4romania/website-factory
[Forms] Issue when modifying form fields
- Dominant language
- PHP
- Stars
- 26
- Forks
- 18
- Avg merge
- 1m
- Merged PRs (30d)
- 14
Description
**Describe the bug**
If new fields are added to a form, they don't appear (correctly) in a results export.
**To Reproduce**
Steps to reproduce the behavior:
1. 🗺️ Go to `/admin/forms` as an admin/editor
2. 🆕 Create a new form (select "Store submissions")
3. ➕ Add (at least) one entry to the form
4. 📤 Export the form results
5. ✏️ Edit the form and add another fillable field between the others
6. ➕ Add (at least) one more entry to the form
7. 📤 Export the form results
8. 🪞 Compare the two spreadsheets, the headers are the same in both but the results after the form was modified are not in the right place
**Expected behavior**
- [ ] The spreadsheet's header should match the form's fields
- [ ] The responses should match the updated header
- [ ] If a field was deleted, its entries should still be kept
ℹ️ It would be ideal that the items in the header are in the same order as the form. We should at least have a 1:1 match between the header and the results for now.
**Screenshots**
Contributor guide
Assessment
This issue has not been assessed yet.