/
Form Logic (Configurator Reference)

Form Logic (Configurator Reference)

You will use a form logic when you need to:

  • Create a form with input fields, where the values of the inputs depend on each other and the visibility of inputs depends on the values selected in other inputs.

Form logics are sometimes referred to as configurator logics.

Logic API

  • Logic Nature: default

    • Logic Type: Calculation/Pricing

  • Execution Types:

    • Standard - To calculate and build the input fields, which fit to current selection of other inputs in the configurator. The logic is executed each time, when the user changes the value of some input field, to rebuild the input fields (and their values), which are relevant to the current entered/selected values.

  • Information provided to the logic

    • input[] - Values entered or selected by the user in the input fields.

  • Expected logic execution outcome

    • Visible logic elements can return one or more form sections (object ConfiguratorEntry) each with one or more input fields (object ContextParameter). The sections will be displayed on the Configurator form in the same order in which they were returned from the elements.

Configuration

The Configurator logic is referred from another logic (e.g., Quote logic), in which you define the interactive form with input fields for the user.

Such logic will add the reference to the Configurator logic via creation of the so-called Configurator input field.

This logic will build an input field, which looks like a button, and when clicked, it opens the form popup
api.inputBuilderFactory() .createConfiguratorInputBuilder( Constant.CONFIGURATOR_INPUT_NAME, Constants.CONFIGURATOR_LOGIC_NAME, // ❶ false) .setLabel("Configure the Delivery") .getInput()

❶ Reference to the Configurator Logic.

Code Sample

  • CFG_Configurator - Simple configurator form with a few sections and some conditional input fields.

Related content

Configurator Forms (Conceptual Guide)
Configurator Forms (Conceptual Guide)
More like this
Configuration Wizard - Wizard Logic
Configuration Wizard - Wizard Logic
More like this
Interactive Forms - Configurators
Interactive Forms - Configurators
Read with this
Configuration Wizard - Execution Logic
Configuration Wizard - Execution Logic
More like this
Layout and Formatting of Input Fields (Reference)
Layout and Formatting of Input Fields (Reference)
Read with this

Found an issue in documentation? Write to us.