Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Including Forms in Other Logics

To include a form in your logic, build an input that references the form by its name:

Expand
titleForms
Code Block
languagegroovy
themeMidnight
linenumbersfalse
def formFieldSet = api.createConfiguratorEntry()

formFieldSet.inputs = [
    api.inputBuilderFactory()
        .createConfiguratorInputBuilder('formuserInput')
        .buildContextParameter()
]

return formFieldSet
Expand
titleIn input generation mode (syntax check mode)
Code Block
languagegroovy
themeMidnight
linenumbersfalse
api.inputBuilderFactory()
        .createConfiguratorInputBuilder('formuserInput', configuratorLogicName, true)
        .getInput()
Expand
titleIn header Logics
Code Block
languagegroovy
themeMidnight
linenumbersfalse
processor.addOrUpdateInput(
        'ROOT',
        api.inputBuilderFactory()
                .createConfiguratorInputBuilder('formuserInput')
                .buildMap()
)

Any inputs that are part of the form can be read normallyYou need to give each form an input name. The inputs from that form will be accessible via that name on the input binding variable:

Code Block
languagegroovy
themeMidnight
linenumbersfalse
input.userInput.nameOfInput as ValueType

...