Datamanager 2 simple checkbox / radiobox select widget.

It can only be bound to a select type (or subclass thereof), and inherits the configuration from there as far as possible.

Available configuration options:

  • string othertext: The text that is used to separate the main from the other form element. They are usually displayed in the same line. The value is passed through the standard schema localization chain.

Note: At this time there is no support for select types with allow_other set at this time.

package midcom.helper.datamanager2


_on_initialize ()

The initialization event handler verifies the correct type.


booleanIndicating Success

add_elements_to_form ($attributes)

Adds checkboxes / radioboxes to the form.



get_default ()

The defaults of the widget are mapped to the current selection.

render_content ()

sync_type_with_widget ($results)

The current selection is compatible to the widget value only for multiselects.

We need minor typecasting otherwise.





int $list_threshold

If render_mode is set to 'auto', this is the maximum number of choices that will be rendered inline

string $othertext

l10n string id or direct text to use to separate the others input field from the main select.

Applies only for types which have allow_other set.


string $render_mode

Controls how the selection list show be rendered, 'horizontal' means all choices will be in one line, 'vertical' means they will be below each other.

'auto' will choose one based on the number of choices