Skip to content

Commit 0b714b4

Browse files
committed
Fix required mark for radios type
1 parent 3137f9f commit 0b714b4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/BootstrapForm.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,12 +559,16 @@ public function radios(
559559
$inline = false,
560560
array $options = []
561561
) {
562-
$elements = '';
562+
$elements = '';
563+
$label = $this->getLabelTitle($label, $name, $options);
564+
$radioOptions = array_merge([], $options);
565+
566+
array_forget($radioOptions, 'required');
563567

564568
foreach ($choices as $value => $choiceLabel) {
565569
$checked = $value === $checkedValue;
566570

567-
$elements .= $this->radioElement($name, $choiceLabel, $value, $checked, $inline, $options);
571+
$elements .= $this->radioElement($name, $choiceLabel, $value, $checked, $inline, $radioOptions);
568572
}
569573

570574
$comment = $this->getComment($options);

0 commit comments

Comments
 (0)