Skip to content
Snippets Groups Projects
Commit 13312ddf authored by Jared Hancock's avatar Jared Hancock
Browse files

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.
parent cd7358a9
Branches
No related tags found
No related merge requests found
...@@ -954,7 +954,7 @@ class TextboxWidget extends Widget { ...@@ -954,7 +954,7 @@ class TextboxWidget extends Widget {
$config = $this->field->getConfiguration(); $config = $this->field->getConfiguration();
if (isset($config['size'])) if (isset($config['size']))
$size = "size=\"{$config['size']}\""; $size = "size=\"{$config['size']}\"";
if (isset($config['length'])) if (isset($config['length']) && $config['length'])
$maxlength = "maxlength=\"{$config['length']}\""; $maxlength = "maxlength=\"{$config['length']}\"";
if (isset($config['classes'])) if (isset($config['classes']))
$classes = 'class="'.$config['classes'].'"'; $classes = 'class="'.$config['classes'].'"';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment