Skip to content

Commit

Permalink
Fixed #7100: Short Free Text is limited to 20 characters (but DB is 2…
Browse files Browse the repository at this point in the history
…55 varchar). Changed maximum length for short free text to match database variable length (65534 chars).
  • Loading branch information
seanrife committed Jan 7, 2013
1 parent 02e47bb commit 48be85f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/views/admin/dataentry/content_view.php
Expand Up @@ -392,11 +392,11 @@ function updateJSON<?php echo $fieldname; ?>() {
$suffix = '';
}

if (intval(trim($qidattributes['maximum_chars'])) > 0 && intval(trim($qidattributes['maximum_chars'])) < 20) { // Limt to 20 chars for numeric
if (intval(trim($qidattributes['maximum_chars'])) > 0 && intval(trim($qidattributes['maximum_chars'])) < 65534) { // Limit to 65535 to maintain compatibility w/database limitations
$maximum_chars = intval(trim($qidattributes['maximum_chars']));
$maxlength = "maxlength='{$maximum_chars}' ";
} else {
$maxlength = "maxlength='20' ";
$maxlength = "maxlength='65534' "; // Default to 65534 chars if not set within limits
}

if (trim($qidattributes['text_input_width']) != '') {
Expand Down

0 comments on commit 48be85f

Please sign in to comment.