Radio

The radio input field lets the user pick one input from a fixed set of alternatives.

radio
Figure 1. A radio input, rendered in the web browser.
Forms
Groovy
def formFieldSet = api.createConfiguratorEntry()

formFieldSet.inputs = [
    api.inputBuilderFactory()
        .createRadioEntry('radio').setOptions('A'..'E')
        .buildContextParameter()
]

return formFieldSet
In input generation mode (input generation mode)
Groovy
api.inputBuilderFactory()
        .createRadioEntry('radio').setOptions('A'..'E')
        .getInput()
In header Logics
Groovy
processor.addOrUpdateInput(                 //❶
        'ROOT',
        api.inputBuilderFactory()
                .createRadioEntry('radio').setOptions('A'..'E')
                .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.radio as String