Problem/Motivation
When a render array contains form field with '#type' of "radios" or "checkboxes", and that render array is added to the markup for the block being rendered the title is rendered but not the radio buttons or checkboxes themselves (from '#options').
I can work around this by replacing '#options' with '#children' => [['#type' => 'radio', ...], ['#type' => 'radio', ...], ...]
, which succeeds in getting the radio buttons rendered, but according to the documentation for Radios or Checkboxes, I should not have to do that.
Steps to reproduce
- Create a custom template
- Add
['#type' => 'radios', '#title' => 'Whatever', '#options' => [1 => 'Larry', 2 => 'Moe', 3 => 'Curly']]
to part of what the custom template is fed. - Observe that the title is rendered, but the radio buttons are not.
Proposed resolution
Render the radio buttons.