fix(SFT-1540): only show fields belong to the selected form #1635
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1610
Resolves an issue with rows in the
freeform_export_settings
after v5 migration. The JSON still contains some old field IDs.We could try to migrate the export settings table. Try to grab all the new field ids for each form in the JSON but that involves keeping track of all previous export settings, previous checked form field ids and the new form field ids and rebuilding the JSON. I feel that could get messy and maybe cause more issues than good. The lesser of the two evils is to hide invalid fields and save new settings. So when the quick export modal opens, we skip over invalid field IDs. Then when the user performs an export, the stale settings are automatically fixed as they get overwritten.
I've also improved the quick export modal styling. Field labels do not wrap and the modal width is set to match the width of the longest label.
Before:
After: