Building Your First App
We recommend building a simple Contact Form as your first application, and we've provided a tutorial for doing so in two mediums: a video and a written tutorial, both of which cover the same material. Feel free to go through both, to use either exclusively, or to supplement one with the other – whatever is most conducive to your learning style.
How to Build a Contact Form Video
[block:embed] { "html": "<iframe class="embedly-embed" src="//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FAoRcjWC5Q4Q%3Ffeature%3Doembed&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DAoRcjWC5Q4Q&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FAoRcjWC5Q4Q%2Fhqdefault.jpg&key=f2aa6fc3595946d0afc3d76cbbd25dc3&type=text%2Fhtml&schema=youtube" width="854" height="480" scrolling="no" title="YouTube embed" frameborder="0" allow="autoplay; fullscreen" allowfullscreen="true">", "url": "https://www.youtube.com/watch?v=AoRcjWC5Q4Q", "title": "Airkit 101 - Build Your First App in 10 Minutes", "favicon": "https://www.youtube.com/s/desktop/15c06292/img/favicon.ico", "image": "https://i.ytimg.com/vi/AoRcjWC5Q4Q/hqdefault.jpg" } [/block]
How to Build a Contact Form Tutorial
Here, we'll cover how to build a Contact Form app from scratch. The app will guide users on a Journey that captures their contact info and then store that information back to AirData.
These are the Studio parts you will be working with:
Journey Builder: Start the Journey
Web Builder: Creating the Contact Form UI
Data Builder: Creating the App Object in AirData
Creating the Data Flow to Insert Data
Connecting the Data Flow to the UI
App Preview: Previewing the App
Creating the Contact Form
When creating an app, you will first land on Journey Builder in the Studio. This is where the app’s Journey is created by choosing a Starting Event.
Since the Contact Form app will be triggered by a link, select Clicks a link.

Click on the '+' icon next to the starting point to add the action that will occur when users click on that link. Among the many options, look for the Navigate to Web Flow Action.

You will be prompted to select which Web Flow to Navigate to. Since the app doesn’t have any Web Flows yet, add one by clicking on Add Web Flow.

To build the Web Flow, you can double click on the added Web Flow or toggle over to Web Builder, where the UI for the application is actually built.
The Contact Form Web Flow will include two Web Pages: A Contact Info Web Page and a Thank You Web Page.
Building the Contact Info Web Page
In Web Builder, double click on the recently added Web Flow to rename it and click on the '+' icon next to it to add the first Web Page. Double click on it to edit the name for a more descriptive one.

Click on the '+' icon next to the 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, that is, fields the users will later complete. The Input Controls on this Form are the following: Name, Phone, Email and Company. Hence, 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.

Building the Thank You Page
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.

Creating the App Object in AirData
To save the information in the app, an App Object has to be built in Data Builder.
From Data Builder, click on the '+' icon next to Datastore and select Add App Object.

Click on the '+' icon next to the recently added object and include the fields that you need. In this case, it’s going to be a Text type, for the name and company fields; a Phone type for the phone number; and an Email type for the email address.
Double click on the App Object as well as on the fields to rename them. We recommend using lower case.
Finally, save the app to run a migration and create the AirData Table where the information will be saved later on.

Creating the Data Flow to Insert Data
A Data Flow has to be created from Connection Builder to send the data back to AirData.
From Connection Builder, click on the '+' icon next to Data Flow and then on Create Blank to add a new Data Flow.

Once added, double click on it to rename it.

In the Inspector section, add the Inputs that will enable you to pass the Values from the Form Inputs to the Data Flow and back to AirData. When all data types display, select the Text input and rename it to “name”; select the Phone input and rename it to “phone” and do the same with the other two fields.

Add an AirData Request Data Operation by clicking on '+' the icon in the Stage.

Inside the AirData Request, choose from the dropdown the App Object that will save the information and select INSERT as the Type of operation to perform since it allows adding an item into AirData.
Since AirData expects a full JSON object to pass in, create the “Contact” object inline. You can check out the schema from the sample data of the App Object, by going to the Start step and adding the Contact Object as a Variable.

Then, copy the schema from the Variable tab:

Go back to the AirData Request step and paste the schema to adjust the sample text to the Inputs. Hence, replace “Sample Text” with the “name” input; the phone number with the “phone” input; and so on.
To test the Data Flow and make sure it is sending the information back to AirData, go to the Run Results section and click on Run. A “Successfully run step” message should pop up.
Save the application and go to Data Builder to check if the data was inserted.
Connecting the Data Flow to the UI
Now that the Data Flow is working and sending data to Data Builder, go back to Web Builder to connect the operation to the UI. In Web Builder, you can define the Action Chain to be run when the users click on “Submit” once they finish completing their Form. This Action Chain is triggered by the Airkit Event of a user clicking the button.
Click on the “Submit” button and go to the Actions tab in the Inspector.

Click on the '+' icon for the Actions menu to display and select Run Data Flow from the Data Options.

Pick the previously created Data Flow and complete the displayed Inputs with the Input Variables of the Web Page. They will be suggested as you type:

Repeat the process to add an action to the button and this time 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.
Previewing the App
Once the app is all set, it can be tested in the App Preview.
Click on Preview at the right-hand corner of the Studio, which will open a new tab.

Click on the globe icon, which allows the app to be launched from the start.

Complete the fields and click on “Submit”.

As expected, it will take the user to the Thank You Web Page.

Finally, go back to Data Builder and check if the entered information has been saved into AirData:

Now the application is ready to be published.
Last updated
Was this helpful?