Skip to content

Add functionality to prototype to be able to specify which input on a page is piped through #62

@rmccar

Description

@rmccar

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions