When users add an accredited provider in the Support console, we use autocomplete to help them search for accredited providers.
The autocomplete works well for quickly selecting an accredited provider, but it requires JavaScript. Not everyone has JavaScript, and it does not always run successfully.
We added a no-JavaScript version of the ‘Add accredited provider’ flow, which we can progressively enhance.
How it works
Selecting ‘Add accredited provider’ on the ‘Accredited providers’ list page takes the user to a form where they can search for an accredited provider. They do this by entering a provider name, UK provider reference number (UKPRN) or postcode.
When the user continues without JavaScript, we show:
- the number of results and the search term in the heading - for example, “7 results found for ‘manchester’”
- a way to change the search if the accredited provider they are looking for is not listed or if there are too many results
- a list of radio options matching their search query - we limit this list to 15 items
We display the name and provider code for each accredited provider in the list. This allows users to choose from similarly named accredited providers correctly.
Selecting an accredited provider from the list allows the user to continue and add the accredited provider.
We show an error message if the user tries to continue without selecting an accredited provider.
If the accredited provider the user is looking for is not listed, or the list has no results, they can change their search, which takes them back to the search form.