From 47469a9c64e60bf6e8f8ac57c16e0aa1766f6921 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Wed, 20 Nov 2013 08:43:43 -0600 Subject: [PATCH] forms: Unless specified, limitless input in long answers Fixes #191 --- include/class.forms.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/class.forms.php b/include/class.forms.php index f54b52c63..0063c1d38 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -503,7 +503,7 @@ class TextareaField extends FormField { 'rows' => new TextboxField(array( 'id'=>2, 'label'=>'Height (rows)', 'required'=>false, 'default'=>4)), 'length' => new TextboxField(array( - 'id'=>3, 'label'=>'Max Length', 'required'=>false, 'default'=>30)), + 'id'=>3, 'label'=>'Max Length', 'required'=>false, 'default'=>0)), 'html' => new BooleanField(array( 'id'=>4, 'label'=>'HTML', 'required'=>false, 'default'=>true, 'configuration'=>array('desc'=>'Allow HTML input in this box'))), @@ -861,7 +861,7 @@ class TextareaWidget extends Widget { $rows = "rows=\"{$config['rows']}\""; if (isset($config['cols'])) $cols = "cols=\"{$config['cols']}\""; - if (isset($config['length'])) + if (isset($config['length']) && $config['length']) $maxlength = "maxlength=\"{$config['length']}\""; if (isset($config['html']) && $config['html']) $class = 'class="richtext no-bar small"'; -- GitLab