Skip to content

Commit 7b84db8

Browse files
authored
Fix bug missing setting setOmitted(true) in Button.php
If form is submitted with standard SubmitButton and in the form is another button Button, the attribute name + value appears in $values of the form. This is undesirable behaviour and my proposal fixes this bug.
1 parent 2146e59 commit 7b84db8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Forms/Controls/Button.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public function __construct(string|Stringable|null $caption = null)
2323
parent::__construct($caption);
2424
$this->control->type = 'button';
2525
$this->setOption('type', 'button');
26+
$this->setOmitted(true);
2627
}
2728

2829

0 commit comments

Comments
 (0)