Build a basic prototype Link your pages together

To take users from one page to another, you can use either:

  • a link (<a> tag)
  • a form (<form> tag, when the user inputs data)
  1. Open start.html in your app/views folder.
  2. Find the {{ govukButton({ component with 'Start now' inside.
  3. Change the href from # to /juggling-balls.

Go to http://localhost:3000/start and select the Start now button to check the link works.

Links normally appear as text with underlines. We make Start now look like a button to make it more obvious to users.

  1. Open juggling-balls.html in your app/views folder.
  2. Find the line <form class="form" action="/path/of/next/page" method="post">.
  3. Change the value of the action attribute from /path/of/next/page to /juggling-trick.

Go to http://localhost:3000/juggling-balls and select Continue to check the button works.

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.

  1. Open juggling-trick.html in your app/views folder.
  2. Find the line <form class="form" action="/path/of/next/page" method="post">.
  3. Change the value of the action attribute from /path/of/next/page to /check-answers.

Go to http://localhost:3000/juggling-trick and select Continue to check the button works.

The 'Check answers' page template links to the ‘Confirmation’ page by default. So you do not need to change the ‘Check answers’ page.