For Prodcom (and potentially others in future) we need to be able to pick from multiple inputs on a page and show one or more (.e.g for a calculated summary).
So we need the ability in the prototype kit to be able to have a page with multiple inputs on it and then specify which answer from that page to pipe into another page.
We should look at whether we can reproduce that functionality in our own prototype kit (preferred, as it increases compatibility and lowers learning bar for any new designers joining ONS from government.
If not possible then the current piping helper needs expanding to provide the ability to target specific inputs and manipulate them (e.g. add input_a to input_b for a calculated summary).
Currently the ONS Prototype Kit provides the functionality to ‘pipe’ answers from one page for display on another https://github.com/ONSdigital/prototype-kit/blob/main/src/helpers/piping.js
For Prodcom (and potentially others in future) we need to be able to pick from multiple inputs on a page and show one or more (.e.g for a calculated summary).
So we need the ability in the prototype kit to be able to have a page with multiple inputs on it and then specify which answer from that page to pipe into another page.
The GOV Prototype Kit uses a data function to allow you to do this:https://prototype-kit.service.gov.uk/docs/pass-data
We should look at whether we can reproduce that functionality in our own prototype kit (preferred, as it increases compatibility and lowers learning bar for any new designers joining ONS from government.
If not possible then the current piping helper needs expanding to provide the ability to target specific inputs and manipulate them (e.g. add input_a to input_b for a calculated summary).