Skip to content
Snippets Groups Projects
Unverified Commit 97d6467e authored by Peter Rotich's avatar Peter Rotich Committed by GitHub
Browse files

Merge pull request #4652 from aydreeihn/issue/short-answer-zero

Issue: Can’t use “0” in Short Answer Field
parents ff52b2d7 3b4ce1db
No related branches found
No related tags found
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.
Finish editing this message first!
Please register or to comment