Skip to content
Permalink
Browse files

Merge branch 'hotfix/InputFieldRequireEqalsFalseNotWorking'

  • Loading branch information...
taliesinmillhouse committed Sep 10, 2019
2 parents 359bba4 + c67a7f0 commit 4adb3fdb0e94766f4cd157dd4df2882b9aec6875
Showing with 9 additions and 2 deletions.
  1. +9 −2 system/classes/html/form/InputField.php
@@ -77,9 +77,16 @@ public function __toString()
$buffer = '<input ';
foreach (get_object_vars($this) as $field => $value) {
if (!is_null($value) && !in_array($field, static::$_excludeFromOutput)) {
$field === "required" ? $buffer .= $field . " " : $buffer .= $field . '=\'' . $value . '\' ';
if (is_null($value) || in_array($field, static::$_excludeFromOutput)) {
continue;
}
if ($field === "required" && ($value === true || $value === "true")) {
$buffer .= $field . " ";
continue;
}
$buffer .= $field . "='" . $value . "' ";
}
return $buffer . '/>';

0 comments on commit 4adb3fd

Please sign in to comment.
You can’t perform that action at this time.