Toggle menu

Multipage Forms and Branching

6. Create a summary

The summary created in the Multipage Forms and Navigation tutorial displayed the values entered into all of the fields of the form.

Because this form now has optional pages, the summary needs to be changed so it only displays fields if they had something entered into them.

HTML template

Using the same HTML template field as the previous tutorial, this time create a "non-blank summary" for all pages:

Non-blank Summary
 

This will generate a template that includes all of the form fields wrapped in Handlebars #if helpers. This means that the row of the summary table will only be generated if the field has a value.

You can edit the template to exclude elements or add additional text.

In a later tutorial we'll look more closely at this field and add edit buttons so a user can jump back to a page to edit their answers.

Last modified on January 09, 2024

Share this page

Facebook icon Twitter icon email icon

Print

print icon