How to use the Form Radios Custom forms sometimes need to include radio buttons, to create a selection option with few options. Drupal 9 Drupal Support Drupal 10 Radios Custom Form Form API Form Form Element Code Snippet $form['settings']['active'] = [ '#type' => 'radios', '#title' => $this->t('Poll status'), '#default_value' => 1, '#options' => [ 0 => $this->t('Closed'), 1 => $this->t('Active'), ], ]