- 18 Oct 2024
-
DarkLight
-
PDF
Create Pool & Virtual Server (BIG-IP) - JSON Forms
- Updated on 18 Oct 2024
-
DarkLight
-
PDF
Before building the lab exercise, let's take a look at JSON Forms.
JSON Forms allow you to quickly and easily build forms to collect user input. Here you will build a simple form to demonstrate the form builder and the various input types available.
JSON Form Video
Step 1
From IAP Cloud, log in to your IAP instance by clicking on the blue Launch icon.
Step 2
From the Itential Automation Platform dashboard, click Automation Studio in the left navigation panel.
Step 3
Click the + at the top of the left navigation panel.
Step 4
The Create window opens. Click the drop down and select JSON Form.
Step 5
We give it a name of Form - BIG - IP - XX where XX represents your initials.
Click CREATE to create the form.
Step 6
We use a drag and drop concept within JSON Forms. By clicking the Form Elements found on the right panel, you can select which types of fields appear in the form. There are seven types of form fields or elements to choose from.
We will drag several Form Elements to the area marked Drop elements here.
Click and drag the Text Input form element to the form canvas.
Step 7
When the element reaches the canvas, a red box will appear indicating where the element will be placed.
Step 8
Next, we need to configure the text field. Hover the mouse over the ellipses located in the upper-right corner.
Step 9
A gear icon appears. Click the gear.
Step 10
The Configure window opens. The Text Input field will be for the users first name. For Label, enter First Name.
Next, let’s make this a required field. Click the Yes radio button.
For the Placeholder, add Enter your first name.
Click Save.
Step 11
Next, add a Text Area. Drag the Text Area field to the canvas.
Step 12
Hover the mouse over the ellipses and click the gear icon.
Step 13
Name the field Interesting Fact and add a place holder description of Enter an interesting fact about yourself.
Click Save.
Step 14
The next type of field we want to add is a Number Input. You drag and drop the field onto the canvas.
Step 15
The Configure window opens. You enter Favorite Number for the Label and accept the remaining defaults. Click Save.
Step 16
Next, you will need a Dropdown field. Drag the Dropdown field to the canvas and open the configure window.
Step 17
Label the field Favorite Color and make it required. Notice near the bottom, there is a warning about options being needed. Click the + Options button.
Step 18
The Configure Options window opens.
Click the + Option button three times to add three options.
Step 19
Click in each field and add any color. In our example we used Green, Blue, and Purple. Click the Back button.
Step 20
The options message has changed. Click Save.
Step 21
We need to add one more field, the Checkbox.
Step 22
Drag the Checkbox element to the canvas. Hover over the ellipses and click the gear icon.
Step 23
Give it a label of I Like Pizza and have it default to checked. Click Save.
Step 24
Our form is complete. Click the Save button and then the Preview icon in the upper-right corner.
Step 25
The Preview Form window opens and we complete the form. Click Show Form Data at the bottom of the Preview Form window.
Step 26
As you can see, the form takes our input and converts into JSON data that can then be passed along when you run an automation. Click Close.
Step 27
Now, let’s try removing our Interesting Fact and see how the form behaves. Click the Previewicon again. Enter First Name, your Favorite Number and select a Favorite Color. Then Click Show Form Data.
Step 28
Again, the form takes our input and converts into JSON data. This time it has removed Interesting Fact as it was not a required field. Click Close.
Step 29
Click the Preview icon. This time enter just your Favorite Number and select a Favorite Color. Then Click Show Form Data.
Step 30
Because First Name is a required field an error is presented and the JSON Form will not allow the user to proceed.
With automations, forms can be created to gather data from users or to build a structure for data input. Later on in this use case, we'll use a similar form that gathers information for our pool, pool members and virtual server. Often times we need to modify the way that the data is structured to fit the needs of other systems or the automation itself. Itential’s low-code solution for data manipulation is called JSON Schema Transformation, or simply Transformations. We’ll take a look at that next.
Click Close.