From 333d428ead846049117eecc16f6fa99caa68df80 Mon Sep 17 00:00:00 2001 From: Lewis Jenkins Date: Mon, 8 Mar 2021 11:03:05 +0000 Subject: [PATCH] Update DefaultTextPlainText.php --- src/fields/DefaultTextPlainText.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fields/DefaultTextPlainText.php b/src/fields/DefaultTextPlainText.php index aeb0529..9b57bf4 100644 --- a/src/fields/DefaultTextPlainText.php +++ b/src/fields/DefaultTextPlainText.php @@ -49,7 +49,9 @@ public function normalizeValue($value, ElementInterface $element = null) protected function inputHtml($value, ElementInterface $element = null): string { - $this->placeholder = $this->getRenderedValue($this->placeholder); + if ($this->placeholder !== null) { + $this->placeholder = $this->getRenderedValue($this->placeholder); + } return Craft::$app->getView()->renderTemplate('_components/fieldtypes/PlainText/input', [ 'id' => Html::id($this->handle),