Remove or Expand Character Count Limit for upload info fields?

3 posts by 2 authors in: Forums > CMS Builder
Last Post: September 8, 2010   (RSS)

By zip222 - September 7, 2010 - edited: September 7, 2010

Is it possible to either remove or expand the character count limit for the upload info fields?

Re: [zip222] Remove or Expand Character Count Limit for upload info fields?

By Chris - September 7, 2010

Hi zip222,

Good question!

It's a little tricky, but it can be done. Unfortunately, the solution involves modifying a CMS Builder source file, so you'll need to remember to make the same change again after upgrading. (Note that you won't need to run the MySQL command again, just the code change.)

1. Run this MySQL statement:

ALTER TABLE cms_uploads MODIFY `info1` TEXT NOT NULL, MODIFY `info2` TEXT NOT NULL, MODIFY `info3` TEXT NOT NULL, MODIFY `info4` TEXT NOT NULL, MODIFY `info5` TEXT NOT NULL

You can use the free MySQL Console addon available on our website if you don't have an easy way to run MySQL statements.

2. Open up cmsAdmin/lib/menus/default/uploadModify.php in a text editor and search for "maxlength" (or find line 98). Remove the code in red below:

$fieldHTML = "<input class='text-input' type='text' name='$formFieldName' value='" .htmlspecialchars($uploadRecord[$infoFieldname], ENT_QUOTES). "' size='55' maxlength='255' />";

I hope this helps! Please let me know if you have any questions.
All the best,
Chris