From 0461d38ff66c246bf6ce1b7c5ceee38bfe3667ad Mon Sep 17 00:00:00 2001 From: Iwona Just Date: Fri, 20 Oct 2023 12:10:57 +0100 Subject: [PATCH] add class to statically rendered field --- src/Field.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Field.php b/src/Field.php index 4677ec9..d852517 100644 --- a/src/Field.php +++ b/src/Field.php @@ -486,7 +486,11 @@ protected function inputHtml(mixed $value, ElementInterface $element = null): st */ public function getStaticHtml(mixed $value, ElementInterface $element): string { - return Html::tag('div', $this->prepValueForInput($value, $element) ?: ' '); + return Html::tag( + 'div', + $this->prepValueForInput($value, $element) ?: ' ', + ['class' => 'noteditable'] + ); } /**