Skip to main content

CalcBuilder Tutorial

Calc Builder field type: Multiple Option List

Multiple Option List lets the visitor tick several choices. The value is an array of the ticked options’ values.

A Multiple Option List rendered as check-boxes.
A Multiple Option List rendered as check-boxes.

Key settings

Options are configured exactly like the Option List. It can render as a set of check-boxes or a multi-select box.

In code

$total = 0;
$prices = ['war' => 40, 'ins' => 60, 'trn' => 90];
foreach ((array) $extras as $code) {
    $total += $prices[$code] ?? 0;
}

To print it, join it first: $list = implode(', ', (array) $extras);.

Part of the Form Fields reference. All types are demonstrated together in the Field Types Showcase.

...
Support/development 10 hours

Get a bigger amount of hours for more complex tasks and get a 10% discount

Buy now!
...
List Manager

Build different lists for your site

Buy now!