Exploring how to quickly and easily design/prototype/deploy high quality digital forms for UK Gov. Based on the excellent work by DEFRA. Currently maintained by jen+forms@cautionyourblast.com at Caution Your Blast and a community collaboration between FCDO, HO, GDS, DfE, DIT, Version 1, UKHSA
Previously when fields were exposed to context, if two fields were in the same section, the second field would overwrite the value of the first field. This is due to the way the value object is built for fields in sections, and how Object.assign works.
The ContextComponentCollection.getFormDataFromState function has now been changed so that the context state does not get overwritten anymore.
Type of change
Please delete options that are not relevant.
[X] Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce
the testing if necessary.
[X] Smoke test for html templating has been updated to include both fields in the same section
[X] Manual testing with form in development
Checklist:
[X] I have performed a self-review of my own code
[X] I have commented my code, particularly in hard-to-understand areas
[X] I have made corresponding changes to the documentation and versioning
[X] I have updated the architecture diagrams as per Contribute.md OR added an architectural decision record entry
Description
Previously when fields were exposed to context, if two fields were in the same section, the second field would overwrite the value of the first field. This is due to the way the value object is built for fields in sections, and how
Object.assign
works.The
ContextComponentCollection.getFormDataFromState
function has now been changed so that the context state does not get overwritten anymore.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce the testing if necessary.
Checklist: