Building the Web UI
Last updated
Last updated
You just created the Web Flow that users will be directed to upon starting their Session. Now let's build out the UI that will be contained in that Web Flow, that is to say the Web Pages.
This Contact Form Web Flow will include two Web Pages: A Contact Info Web Page and a Thank You Web Page.
In Web Flows Builder, double click on the recently added Web Flow and rename it to "Contact Form". Similarly, rename the nested Web Page to "Contact Info".
Click on the '+' icon next to the "Contact Info" Web Page to add the Web Controls one by one. There are different types of Controls, each serving a specific purpose.
This Contact Form includes Input Controls, which are fields the users will later complete. The Input Controls on this Form are the following:
Name - Text Input
Phone - Phone Input
Email - Email Input
Company - Text Input
Choose the Text Input Control for the “Name” and "Company" fields, as users are expected to enter a text; choose the Phone Input Control for the “Phone” field, as users are expected to enter numbers following a phone format; and choose the Email Input Control for the "Email" field.
For each Input Control, a Variable is automatically created and binded to the Value of that input.
Once the Controls are added, include a Label Control above each of them to show the user what input they are filling out.
To edit the Label, double click on it in the Stage or change the Text property in the Inspector section. You can also change the style of the Label by choosing a Variant.
Finally, add a Button Control. This will be later used to submit data collected from users to AirData.
Edit the name by double clicking on it or from the Text in the Inspector section.
Now that the Form is ready, click on the Web Page to check all the auto-created Variables that will store the input Values. If necessary, rename the Variables so they are easy to identify. For example, change text_input
to name_input.
Add a Thank You Web Page to the Web Flow for users to see after completing the Form.
Click on the '+' icon next to the Web Flow and add the second Web Page. Double click on it to edit the name for a more descriptive one.
Click on the '+' icon next to the new Web Page to add the Label Control.
Type the message users will see on submitting the Form by editing the Label.
You've now built out the complete UI for your form.
We are going to link an action to our Submit button to display a Thank you message after submitting the contact information.
Click on the “Submit” button and go to the Actions tab in the Inspector and Click on the '+' icon. The Actions menu will be displayed.
Select the Navigate to Web Page action. Choose the Thank You Web Page so that users are directed there when clicking on the button.
Save the app and it will be ready to be tested.
To Preview, click on the Preview Button in the top right hand corner. This will open up a new tab and open up the App Preview.
Click on the web icon to launch the web experience
You can also open up the state viewers on the right side of the screen to see the different states of your application.
Fill out the form and click on Submit, you should be navigated to the next web page!