Work in progress
This page is a design preview. It may not contain the latest guidance and may not behave as expected.
Current guidance can always be found at design-system.dwp.gov.uk.
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.
To use this plugin, first start a prototype by installing the GOV.UK Prototype Kit (version 13 or later).
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
const alternativeFormatsPlugin = require("alternative-formats-plugin");
alternativeFormatsPlugin(router);
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.
Need help implementing this in a prototype or production build? Get support from the Design System team.
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.
Send questions, comments or suggestions to the DWP Design System team.
Last updated: