Widget Displaying
Widgets contain client and server logic, template, and styles. For the real interaction, it is required to place an implemented widget on a specific object. In SimpleOne, you can place a widget on a record form or on a portal page.
Add a widget on a record form
Forms display a set of fields of various types. Forms can also include widgets.
Before adding a widget to a form, configure it. To do so, complete the following steps:
- Create a widget. See the Widget Scripts article to learn how to create it.
- Define the behavior and appearance of the widget, define its server and client logic.
- Specify the tables of the records where a widget should appear. These tables can be selected in the Tables field of the widget creation form. To display a widget on the records of the child tables, use the Inheritance attribute.
- Add a widget to a form using the Form Layout base functionality.
For example, you need to create a widget to be displayed on records of all child tables of the ITSM Task table (Incidents, Change Requests, Problems, and so on).
When creating a widget, specify the ITSM Tasks table in the Tables field and select the Inheritance checkbox. The widget will be displayed on records of the ITSM Task table and its child tables.
Add a widget on a portal page
To place a widget on a portal page, use the Widget Instances (sys_widget_instance) table. These elements define a specific location of widgets according to the portal column specified, and customize the widget options with the option schema.
To configure widget displaying, complete the steps below:
- Navigate to Portal Structure → Widget Instances.
- Click New to create a new widget instance record.
- Fill in the fields.
- Click Save or Save and exit to apply the changes.
Widget Instance form fields
Field | Mandatory | Description |
---|---|---|
Widget | N | Select the widget you need to display. |
Page column | N | Select a page column you need to add a widget to. This field will be prefilled if you reach this form from the Related Lists area of a Page Column record. |
Option values | N | Fill in the field with widget overridden options. |
Active | N | Select this checkbox to activate this widget instance. |
Public | N | Select this checkbox to make this widget instance available to unauthorized users. |
Order | N | Specify the order of the widget in the portal column. |
The new widget instance record appears in the Related Lists area of the Widget record and the Portal Column record forms.
If you have multiple instances of the same widget, adjust their options to distinguish between them. For more information, see the Page Structure article.
Determine the location of a widget
To determine whether a widget is shown on a record form, perform the following steps:
- Navigate to Portal Structure → Widgets and open the widget you need.
- If the Tables field is populated, the widget is displayed on record forms within the specified table.
Another way to determine whether a widget is shown on the record forms:
- Open the Widget Instance record you need.
- In the Related Lists area, select the UI Form Element tab.
- The Form Section.Form.Table column specifies the table.
- The Form Section.Form column defines the form layout name.
To define whether a widget is displayed on a portal page, complete the steps below:
- Navigate to Portal Structure → Widgets and open the widget record you need.
- In the Related Lists area, select the Widget Instance tab.
- Open the record you need.
- If the Page column is populated, the widget is located on a portal page.
To go to the page settings where a widget is located, complete the following steps:
- On the Widget Instance record form, open the related Page Column record.
- On the Page Column record form, open the related Page Row record.
- On the Page Row record form, open the related Page Container record.
- On the Page Container record form, open the related Page record.