Skip to main content
Choose alternative contact formats

Prototyping

If you are using the GOV.UK prototype kit you can install the full DWP Choose alternative contact formats pattern into a prototype as a plugin, with minimal coding. It includes pages, routes and logic for collecting information about users' written and spoken contact needs.

The list of contact formats is that used in the example journey.

Requirements

To use this plugin, first start a prototype by installing the GOV.UK Prototype Kit (version 13 or later).

Installation

1. Install the plugin

In the folder that contains your prototype, install the plugin by running the following terminal command:

npm install https://github.com/dwp/alternative-formats-plugin

2. Add the following code to your prototype's app/routes.js file

const alternativeFormatsPlugin = require("alternative-formats-plugin");
alternativeFormatsPlugin(router);

3. Add the pattern to your prototype

Link or redirect from any page in your prototype as shown below. In this example the link is a ‘Continue’ button.

{{
    govukButton({
        text: "Continue",
        href: "/dwp-alternative-formats-plugin/start?alternative_formats_exit_url=/your-exit-url",
        isStartButton: false
    })
}}

This link also controls what happens next when the user finishes choosing contact formats. In the link, replace /your-exit-url with the URL that should load when the user selects ‘Continue’ on the last page of the pattern (the Check answers page).

(See Use links to set data for more about how this works.)

The user's answers are stored in the browser session and will be cleared (along with any other stored session data) by the ‘Clear data’ link in the prototype footer.

Get support

Need help implementing this in a prototype or production build? Get support from the Design System team.

Give feedback

We depend on insights from real projects to update and improve the design system. If you use something we made, tell us how it went.


Could we improve this page?

Send questions, comments or suggestions to the DWP Design System team.

Last updated: