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 this, complete the following steps:

  1. 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 Inherited attribute.
  2. 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 ITSM Task child tables (for example, Incidents, Change Requests, Problems, and so on).

When creating a widget, specify the ITSM Tasks table in the Tables field and select the Inherited 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:

  1. Navigate to Portal Structure → Widget Instances.
  2. Click New to create a new widget instance record.
  3. Fill in the fields.
  4. Click Save or Save and exit to apply the changes.

Widget Instance form fields

FieldMandatoryDescription
WidgetN

Select the widget you need to display.

Page columnN

Select a page column you need to add a widget to. This field will be pre-filled if you reach this form from the Related Lists area of a Page Column record.

Option valuesNFill in the field with widget overridden options.
ActiveNSelect this checkbox to activate this widget instance.
PublicNSelect this checkbox to make this widget instance available to unauthorized users.
OrderN

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 to learn more.

Determine the location of a widget


To determine whether a widget is shown on a record form, perform the following steps:

  1. Navigate to Portal Structure → Widgets and open the widget you need.
  2. 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:

  1. Open the Widget Instance record you need.
  2. Scroll down to the Related Lists area and open 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:

  1. Navigate to Portal Structure → Widgets and open the widget record you need.
  2. In the Related Lists area, select the Widget Instance tab.
  3. 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:

  1. On the Widget instance record form, open the related Page column record.
  2. On the Page column record form, open the related Page row record. 
  3. On the Page row record form, open the related Page container record.
  4. On the Page container record form, open the related Page record.

  • No labels