Skip to content
Snippets Groups Projects
Commit 3b4ce1db authored by aydreeihn's avatar aydreeihn
Browse files

Issue: Can’t use “0” in Short Answer Field

This commit fixes an issue where a Short Answer Field would show as Empty if the value saved in it was '0'
parent 2fd4a421
Branches
Tags
No related merge requests found
...@@ -1478,6 +1478,11 @@ class TextboxField extends FormField { ...@@ -1478,6 +1478,11 @@ class TextboxField extends FormField {
function parse($value) { function parse($value) {
return Format::striptags($value); return Format::striptags($value);
} }
function display($value) {
$value = $value ?: $this->value;
return ($value == 0) ? '&#48' : Format::htmlchars($this->toString($value));
}
} }
class PasswordField extends TextboxField { class PasswordField extends TextboxField {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment