Skip to content

Commit 211314c

Browse files
committed
Merge pull request #90 from martinknor/master
BaseControl: disabled controls are always omitted
2 parents 7478406 + 2a6cde4 commit 211314c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Forms/Controls/BaseControl.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ public function setDefaultValue($value)
191191
public function setDisabled($value = TRUE)
192192
{
193193
if ($this->disabled = (bool) $value) {
194-
$this->omitted = TRUE;
195194
$this->setValue(NULL);
196195
}
197196
return $this;
@@ -226,7 +225,7 @@ public function setOmitted($value = TRUE)
226225
*/
227226
public function isOmitted()
228227
{
229-
return $this->omitted;
228+
return $this->omitted || $this->disabled;
230229
}
231230

232231

0 commit comments

Comments
 (0)