Introduction to Forms Multi-Page and Branching Final Task
For this task, build a form that that has a dropdown on the first page, and based upon the choice from that dropdown the user can either go to page 2, or page 3, with page 4 being a check answers page. You can give your pages names if you would like to, in the examples provided with this task the page names have been labeled 'Page #' for demonstrational purposes. The example shown is for people to choose what they would like to eat but you can have your example do anything you like.
Create the form and set Up Page 1
Create a public form in the training area, save and publish your form.
Create an article, set the template to Forms Service and relate your new form to the article.
Navigate to the page that you have created on the front end of the site.
Move back into the forms section and edit the form that you have just created.
Add three pages so you have PAGE1, PAGE2, PAGE3 and PAGE4. Rename the last page to be OVERVIEW and add a title to each page.
Add a Vertical Layout to page 1, the Layout on page one should include a Text Input Basic Field called NAME and a Drop-Down List called FOODOPTION. Make sure that all fields are labelled and named correctly e.g. the vertical layout.
Add your Group Options for the Drop-Down List (including Please select with a blank value)

Add your first Navigation button. This Navigation is for the next page so label it Continue, the navigation mode should be Next, Validate, Actions Performed. The Navigation function should be similar to the below:

It is recommended that your pages are named, the above pages are not named for demonstrational purposes.
In the above statement we have used 'if.. else if...', however using just an 'else' rather than 'else if' would also work.
- The If statement comes from Logic
- The Blank = Blank comes from Logic
- The Value of field comes from Form Fields
- The free text option comes from Text
- The page option comes from Form Pages.
Pages 2 and 3
Page 2
On page 2 add a layout and at least one field (could be a dropdown field, a Radio Button Group, a Checkbox group or any of the Text Input fields) for the sandwich options. If you have used a Dropdown, Checkbox group or Radio Button Group then remember to add your Options/Grouped Options.
The example below is using a Dropdown field:

This time we need two Navigation buttons, one for Back and one for Continue.
The Back Navigation should appear at the top of the page and it is to go back so label it 'Back', the navigation mode should be Back, no validation. The Navigation function should take us back to the first page:

The Next Navigation is to go back so label it 'Continue', the navigation mode should be Next, Validate, Actions Performed. The Navigation function should take us to the last page 'OVERVIEW':

Page 3
Page 3 should be quicker than Page 2, we can copy the fields from Page 2 and delete fields or amend the values as required. First of all copy the layout with your field in it and paste it onto page 3. You can now delete any fields that are not required, amend the name, layouts and grouped options if there were any.
As the Back and Next functions will be identical on Page 3 to Page 2 we can copy the buttons on Page 2 and paste this into Page 3.

Check Answers Page
Page 4 (CONFIRM)
Page 4 will contain a HTML Template (server-side) Field to display the non-blank summary card and a Submit button.
To add your Check your answers sections, go to Tool Box > 'Display add HTML Template (server-side)'
- Name the field CheckYourAnswers
- In Template under field settings open up the text display
- Select the Sigma option

- Non Blank Summary Card > All Pages
As page 2 and page 3 may not be completed, locate one of the if statements for one of the fields on each of the pages {{#if (FIELD "FIELDNAME")}} e.g. {{#if (FIELD "SANDWICHFILLING")}} and move it to sit above the <hr class="icmform__separator icmform__separator--cards" /> text for that section and move the corresponding {{/if}} to sit beneath the last </div> for that section i.e. before the next <hr class="icmform__separator icmform__separator--cards" /> section.
Repeat for the other page so that this is in place for page 2 and page 3.
The statement should look like the below:
- Choose OK
Add a Submit button, and a Thank You Message (Confirmation Message action) on the OVERVIEW page.
Add a "Wizard Buttons" option to the bottom of page 1, setting the Navigation buttons to false then copy the field to page 2 and page 3, renaming the field as required.
Publish your form and relate it to your article.
Test that your form is working as expected.
