Low-Code Designer > Setting up interfaces / Context types

Context types

Context variables are used in interface configuration and scripts. Variables determine specific values for the widgets, for example, counter value. In addition, they configure the display of page components, place the necessary fields, etc.

There are two different categories: Widget context and App context.

Widget context

 

Widget context contains the variables used in widget and pages configuration. These variables can fetch the information from apps, configure the widget display, upload files, etc.

You can add these variables in the Context tab of the Interface designer.

CT1

Click +Add and create the variable you need. Read more about the data types in this article.

Note that you can only use Latin symbols in the Property name of the variables. Additionally, try to use names that show the key aspect of the variable and are easy to understand: Username instead of Var123, for example.

You can find the added variables in the Properties tab in the right sidebar.

CT2

You can use the added variables in widget configuration and scripts.

Let’s take a look at the following example:

Suppose you want to add the payment instructions column to the page. You want it to be visible to users only under the specific condition, when the sales manager selects the Post-payment payment method.

To do this, add the Column widget to the page. Create the Yes/No switch variable in the Context tab and check the Hide box, when you drag it to the page. This variable allows the user to select either of the two options. You can customize the names of the options as well. For the purpose of this example, name them Down payment and Post-payment.

CT3

Place the variable onto the page for the user to select one of the payment methods. When they select the Post-payment option, the hidden column with the following order processing instructions will appear.

You can use the same variable in the script with On mouse enter handler of the Button widget, for example. In that case, the column will appear when the user hovers the mouse over the button.

App context

 

App context contains the app properties for the forms configuration. Properties are form fields you use to enter names, specify order total, upload a file, etc.

You can configure the app properties using the standard mode, the advanced mode, and the interface designer.

You can find the app properties in the Properties tab on the right sidebar of the interface designer. You can drag them to the field and place in the appropriate order.

CT4

Read more about form properties in this article.

Read more about the interface designer in form template configuration in this article.

Found a typo? Highlight the text, press ctrl + enter and notify us