From 3b4ce1dbc5069f894d59e6a74d23a206f852da92 Mon Sep 17 00:00:00 2001 From: aydreeihn <adriane@enhancesoft.com> Date: Tue, 8 Jan 2019 13:43:28 -0600 Subject: [PATCH] =?UTF-8?q?Issue:=20Can=E2=80=99t=20use=20=E2=80=9C0?= =?UTF-8?q?=E2=80=9D=20in=20Short=20Answer=20Field?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit fixes an issue where a Short Answer Field would show as Empty if the value saved in it was '0' --- include/class.forms.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/class.forms.php b/include/class.forms.php index 2c3ec0da7..0b54f965e 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -1478,6 +1478,11 @@ class TextboxField extends FormField { function parse($value) { return Format::striptags($value); } + + function display($value) { + $value = $value ?: $this->value; + return ($value == 0) ? '0' : Format::htmlchars($this->toString($value)); + } } class PasswordField extends TextboxField { -- GitLab