Create a second question page
Create another empty file for your second question named details.html in your app/views folder.
As before, add this line to the top of each file:
Preview the page by visiting http://localhost:3000/details in your browser.
Our details.html page is going to have a textarea component to collect details of the users symptoms.
- Go to the textarea page of the design system.
- Select the Nunjucks tab under the ‘Radios with hints’ example, then Copy code.
- Open
details.htmlin yourapp/viewsfolder. - Paste the component inside the
<form>tag, before the continue button.
Customise the example code
- Delete
{% from "textarea/macro.njk" import textarea %}. These import lines are not needed in the prototype kit. - Under
label, changetextfrom “Can you provide more detail?” to “Tell us your symptoms of magical powers”. - Change the
idandnametodetails. - We don’t need a hint, so remove it and the comma just before it.
- We also want to make the label be the page
h1, so in thelabelarea addsize: "l",andisPageHeading: true
Your component code should now look like this:
Your page should now look like this:

Link the pages together
As before, you’ll need to link 2 pages together.
Make the back link work
Find the back link on this second question page and update the href to /magical-powers to link it back to the first question.
Make the continue button on the first question work
You’ll notice that the continue button on the first question page takes you to a ‘Page not found’ error page.
To make this button work, you will have to do something different from the button on the start page. That’s because this time it’s a real HTML button, not a link. Buttons submit form data – the URL is on the form tag, not the button.
To make the form work:
- Open
magical-powers.htmlin yourapp/viewsfolder. - Find the line
<form action="/form-handler" method="post" novalidate>. - Change the value of the
actionattribute from/form-handlerto/details.
Click on the Continue button to check that it now works. It should take you the second question page.