Skip to content

Commit 98ce266

Browse files
committed
Fixed field layout bug
1 parent dda033d commit 98ce266

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44

55
- Fixed a bug where asset edit page URLs contained spaces if the asset filename contained spaces. ([#15236](https://github.com/craftcms/cms/issues/15236))
6+
- Fixed a bug where custom fields were getting included in rendered field layout forms, even if their `getInputHtml()` method returned an empty string.
67

78
## 4.13.7 - 2024-12-17
89

src/fieldlayoutelements/CustomField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ protected function inputHtml(?ElementInterface $element = null, bool $static = f
284284
$this->_field->required = $required;
285285
$this->_field->describedBy = $describedBy;
286286

287-
return $html;
287+
return $html !== '' ? $html : null;
288288
}
289289

290290
/**

0 commit comments

Comments
 (0)