Text

The text field inputs let the user type a text in a box.

Single-line Text

The string input lets the end user type text freely on a single line:

single line
Figure 1. An input for providing a single-lined string, rendered in the web browser.
Forms
Groovy
def formFieldSet = api.createConfiguratorEntry()

formFieldSet.inputs = [
    api.inputBuilderFactory()
        .createStringUserEntry('string')
        .buildContextParameter()
]

return formFieldSet
In input generation mode (input generation mode)
Groovy
api.inputBuilderFactory()
        .createStringUserEntry('string')
        .getInput()
In header Logics
Groovy
processor.addOrUpdateInput(                 //❶
        'ROOT',
        api.inputBuilderFactory()
                .createStringUserEntry('string')
                .buildMap()
)

❶ the processor can be one of the quoteProcessor, cProcessor, etc., which references subclasses of the CalculableLineItemCollectionBuilder

Reading input value

Reading input value in a line-item logic.

Groovy
def value = input.string as String

Multi-line Text

The text input lets the end user type longer text:

multi line
Figure 2. An input for providing a multi-lined string, rendered in the web browser.
Forms
Groovy
def formFieldSet = api.createConfiguratorEntry()

formFieldSet.inputs = [
    api.inputBuilderFactory()
        .createTextUserEntry('text')
        .buildContextParameter()
]

return formFieldSet
In input generation mode (input generation mode)
Groovy
api.inputBuilderFactory()
        .createTextUserEntry('text', )
        .getInput()
In header Logics
Groovy
processor.addOrUpdateInput(                 //❶
        'ROOT',
        api.inputBuilderFactory()
                .createTextUserEntry('text')
                .buildMap()
)

❶ the processor can be one of the quoteProcessor, cProcessor, etc., which references subclasses of the CalculableLineItemCollectionBuilder

Reading input value

Reading input value in a line-item logic.

Groovy
def value = input.text as String