From 13312ddfe165111b41f3e0b57202eacef18dac3b Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Mon, 26 May 2014 15:29:38 -0500 Subject: [PATCH] forms: maxlength of 0 means disable maxlength Instead, previously, a maxlength of zero effectively disabled the field, because it prevented any user input into the field. --- include/class.forms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/class.forms.php b/include/class.forms.php index dd5477cc9..ded5e7663 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -954,7 +954,7 @@ class TextboxWidget extends Widget { $config = $this->field->getConfiguration(); if (isset($config['size'])) $size = "size=\"{$config['size']}\""; - if (isset($config['length'])) + if (isset($config['length']) && $config['length']) $maxlength = "maxlength=\"{$config['length']}\""; if (isset($config['classes'])) $classes = 'class="'.$config['classes'].'"'; -- GitLab