Skip to content

Commit a8da7d4

Browse files
authored
Makes check for field type="Hidden" case-insensitive (#33769)
Fixes issue with field not being seen as hidden when using `type="Hidden"` instead of `type="hidden"`
1 parent 91d093c commit a8da7d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/src/Form/FormField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ public function setup(\SimpleXMLElement $element, $value, $group = null)
686686
$this->repeat = ($repeat === 'true' || $repeat === 'multiple' || (!empty($this->form->repeat) && $this->form->repeat == 1));
687687

688688
// Set the visibility.
689-
$this->hidden = ($this->hidden || (string) $element['type'] === 'hidden');
689+
$this->hidden = ($this->hidden || strtolower((string) $this->element['type']) === 'hidden');
690690

691691
$this->layout = !empty($this->element['layout']) ? (string) $this->element['layout'] : $this->layout;
692692

0 commit comments

Comments
 (0)