Skip to main content

Form Controls

Overview

Form controls are interactive widgets that you can add to panel cards within an experiment dashboard. They serve two primary functions:

  • Set Initial Values for Model Data Objects: Before an experiment run, these controls allow you to input or modify the starting values that will be assigned to your model's parameters.

  • Trigger Interactions with Other Widgets: They can initiate actions on other widgets on the same dashboard, such as changing their visibility (show/hide/disable) or setting their values.

Widget Types and Trigger Actions

The following table summarizes common Form controls available in HoloBit Panel Cards, their value types, typical trigger events, and illustrative examples (where applicable).

Ref.Widget TypeValue TypeTypical Trigger Event(s)Illustration
2.1SwitchBooleanToggled On/Off (onChange)Switch Widget
2.2Number InputNumberInput Finalized (onBlur)Number Input Widget
2.3Single-Line Text InputStringInput Finalized (onBlur)Single-Line Text Input Widget
2.4Multi-Line Text AreaStringInput Finalized (onBlur)Multi-Line Text Area Widget
2.5SelectString/Number/BooleanSelection Changed (onChange)Select Widget
2.6SliderNumberValue Changed (onChange, supports drag or keyboard input)Slider Widget
2.7Button(No data binding)Clicked (onClick)Button Widget

Configuration Steps

Beyond universal widget settings (like Label and initial State), Form controls have specific configuration options detailed below.

Binding to Model Data Objects

Most Form controls (except for Buttons, which primarily trigger actions) can be bound to a data object (parameter/variable) within your simulation model. This binding allows the control's value to directly set the value of the linked model data object.

Steps to Bind a Control

Bind a Control

Step 1. Select the Widget: On the Panel Canvas, click the Form you want to configure.

Step 2. Access Binding: In the Properties Pane that appears, locate and click the "Bind" option. This usually opens a searchable list or dialog.

Step 3. Choose the Target Data Object: From the presented list (which is typically searchable):

  • Primary text: Object name (e.g., populationSize, interestRate).

  • Secondary (grey) text: Parent Entity / Process(e.g., Agent: Investor / Process: DecisionMaking)

Step 4. Confirm Binding: Once selected, the Properties Pane will typically display the binding:

  • Highlighted object name

  • Parent entity/process in grey parentheses

When the experiment starts (i.e., when you click "Play"), the current value of this widget will be written to the bound model data object, serving as its initial value for that experiment run.

Tips
  • Initial value precedence for data objects (highest → lowest):

    1. Experiment Form Control Value
    2. Model Controller Configuration
    3. Individual Properties Settings
    4. Entity Default Property Value
  • Form controls vs Controller components:

    1. Form controls only set initial values for the model parameters before the experiment starts. Once the experiment is running, you cannot change these controls, and they cannot affect how the experiment runs. Any changes must be made before starting the experiment.
    2. This key difference separates form controls from Controllers in model scenarios, which can be adjusted both before and during the simulation, allowing you to change how the model behaves in real-time.

Configuring Options for Select

For a Select widget, you need to define the list of choices available to the user.

Configure Options for Select

  • Click + Add to create or - Delete to remove options.
  • For each option, you need to specify:
    • Label: Visible text in dropdown menu; used as reference in interaction events.
    • Value: Data (String/Number/Boolean) sent to bound model parameter; defaults to Label if empty.

Setting the Range for Sliders

For Slider widgets, you define the operational range and step size.

Setting the Range for Sliders

  • Minimum Value (min): The lowest value the slider can represent.
  • Maximum Value (max): The highest value the slider can represent.
  • Step (step): The increment by which the slider's value changes.

Configuring Interaction Events

Interaction events allow you to define how one Form control (the Trigger) affects another widget (the Target) on the same dashboard by applying an Effect.

For a comprehensive table which widgets can trigger actions and be targeted, and what effects are possible, refer to the table of Interaction Capabilities Overview in the Parameter Exploration > Widget Settings > Interaction Events section.

Steps to Set Up an Interaction Event

Step 1: Add New Event

Click the + to create or - to delete an event.

Interaction Events

Step 2: Configure the Event

A configuration dialog or set of dropdowns will appear, requiring you to specify the following three aspects:

Configure the Event

  • Event (Trigger)

    • From the Event selection dropdown, choose the action on the current widget that will initiate the interaction.
    • The available trigger actions depend on the type of widget you are configuring. Refer to the "Triggers" in the table of Interaction Capabilities Overview mentioned above. (The actual interface might present these differently based on widget type).

      Trigger Actions

  • Target

    • Select the widget that will be affected by this interaction event. You can choose from a list of other widgets that have already been added to the Global Panel or the current Dashboard Panel and have a Label set.
    • Example: In the image below, a slider named "S1 (Slider)" is selected as the target.

      Target Widget

  • Effect

    • This defines what happens to the Target widget. The available effects depend on the capabilities of the target widget as outlined in the "Target Widget?" column in the table of Interaction Capabilities Overview.

      Effect

    • State Change
      • If the target widget supports state changes, you can choose effects like Show, Hide, Enable,Disable. For layout widgets, additional options like Expand/Collapse or custom states might be available.
      • For state-change effects, typically no additional parameters are required.
    • Value Assignment
      • If the target widget supports receiving a value (e.g., another Form control), you can choose an Assign (or similar) effect. For example, in the image below, the effect Assign is chosen for the target slider "S1".

        Value Assignment

      • For value-assignment effects , input a compatible value based on the target widget's data type. Example: Enter numerical values for Sliders, Boolean (true/false) for Switches, or String values for Text fields.

Example: Select "A" → Slider "S1" = 10

Let's illustrate with a common scenario: selecting an option in a dropdown sets the value of a slider.

Step 1: Configure the Select Widget ("MyDropdown")

  • Add an option with Label = A and Value = 10.

Step 2: Configure the Slider Widget ("S1")

  • Ensure it has a label (e.g., "S1").
  • Keep its default range and step, or set as needed (e.g., min 0, max 100, step 1).

Step 3: Create the Interaction Event on "MyDropdown"

  • Select "MyDropdown". In its Properties Pane, add a new Event.
  • Event: SelectOption A.
  • Target: S1 (Slider).
  • Effect: AssignValue =10.

After these three steps, the event is now active: When the user selects option "A" in "MyDropdown", the "S1" slider will automatically jump to the value 10.

You can add multiple interaction events to a single trigger widget or link various widgets in chains to create rich, user-friendly panel experiences.

4. Example (To be supplemented)