This demonstration illustrates the ability to implement Dynamic Forms as a Multi-Page/Wizard. This will allow you to take your user through a step-by-step process, ensuring step "n" is only achieved after the previous steps have been successfully completed. This example demonstrates how to take user-supplied input on the first page of the process, then allow the user to enter an email address on the second page. Our second page will then send an email to the address provided containing the information entered by the user.
A real-world example would be a "New Registration" process, where a user must register an account with the application. The registration details are then emailed to an administrator who authorizes the new account and allows the user to access the application.
In order to successfully implement this functionality we will do the following:
1) Create a new page for each step in the process, from 1 to "n". In this case we created 2 separate pages.
2) On page one we will add our 5 questions we want the user to answer.
3) When creating these questions and supplying a unique "ShortName" for each question, we will select the "Pass values of this question to session variable:" checkbox listed under the "Advanced Field Options".
4) After all questions have been added we will then add a "Completion Event" for page 1. We will provide a name for the "Event". We select "URL / Page Redirection" for the "Event Type". We will then select the "Page (A Page On Your Site)" option and select "Page 2" from the dropdown menu.
5) On page 2 we will add a text box question, asking the user to enter the email address where the information entered on page 1 should be sent.
6) We then add 5 "hidden field" questions, whose "ShortName" is identical to the "ShortName" for each question on page 1. Example: Our "First Name" field has the "ShortName" of "FName", as such we will need a "hidden field" with the "ShortName" of "FName". This hidden field will store the value of the "First Name" that was entered on page 1.
7) On these 5 "hidden fields" we will select the "Retrieve values from session variable for this question:" checkbox. This setting will ensure the "ShortName" fields populated on page 1 are passed/retrieved by the "ShortName" hidden fields created on page 2.
8) On page 2 we will add a new "Form Completion Event". We give the event a name and select the "Dynamic Email" event type.
9) In the "Email To:" field we will enter the "ShortName" value token, in this case our "ShortName" was "EmailTo", so our token value becomes "$(EmailTo)". This will ensure the email is sent to the email address supplied by the user on page 2. We will provide a subject for the email.
10) The body of our email will contain the data entered by the user on page 1. In this case our email body will look like this:
Below are the values you entered on the Dynamic Forms Multi-Form demonstration page.
First Name: $(FName) Last Name: $(LName) Address: $(Address) City: $(City) State: $(State) Zipcode: $(Zipcode) |
In the end you should be able to fill in the questions on "Page 1", click the "Save/Continue" button, which will redirect us to "Page 2". Once on "Page 2" we will enter our email address and click the "Save" button. Once completed, you should receive an email containing the data you entered on "Page 1".