diff --git a/src/Inputs/RadioInput.php b/src/Inputs/RadioInput.php
index 749549a..3873739 100644
--- a/src/Inputs/RadioInput.php
+++ b/src/Inputs/RadioInput.php
@@ -46,6 +46,9 @@ public function getControl(): Html
$items = $this->getItems();
$container = $this->container;
+ // one attribute on the fieldset disables every radio inside it, the same
+ // way CheckboxListInput handles a wholly disabled control
+ $container->setAttribute('disabled', $this->isControlDisabled());
$c = 0;
$htmlId = $this->getHtmlId();
diff --git a/tests/E2E/FormSubmissionTest.php b/tests/E2E/FormSubmissionTest.php
index c25fc69..7e9317c 100644
--- a/tests/E2E/FormSubmissionTest.php
+++ b/tests/E2E/FormSubmissionTest.php
@@ -261,6 +261,25 @@ function (): BootstrapForm {
$this->assertNull($form['country']->getValue());
}
+ public function testWhollyDisabledRadioListIsRenderedDisabledAndRejectsItsPost(): void
+ {
+ $form = $this->submit(
+ function (): BootstrapForm {
+ $form = new BootstrapForm();
+ $form->setAction('/');
+ $form->addRadioList('size', 'Size', ['s' => 'Small', 'l' => 'Large'])
+ ->setDisabled(true);
+ $form->addSubmit('send');
+
+ return $form;
+ },
+ ['size' => 's']
+ );
+
+ $this->assertNull($form['size']->getValue());
+ $this->assertStringContainsString('