Changing Field Type

12 posts by 4 authors in: Forums > CMS Builder
Last Post: November 30, 2012   (RSS)

By gregThomas - November 29, 2012 - edited: November 29, 2012

Hi,

The null flag means that the field is not allowed to be empty in the MySQL table. This shouldn't be an issue as the CMS Builder will always add content to the info1 field, even if it's just an empty string.

I'm not sure what is causing deleted uploads to start appearing in the table, is the related picture still in the uploads directory?

It is possible to amend the character limit of the text field from 255 up to a higher number, but it will require changing code in the back end of the CMS. So you will need to carry out a full backup first, and if you carry out an upgrade at a later date you will need to make these changes again.

If you go to the file cmsAdmin/lib/menus/default/uploadModify.php on line 98 you should see this:

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

If you remove/increase the maxlength value (highlighted in green) to what you have set the field length too.

This code is used to generate all of the text fields for the upload box. So if you do this you will need to increase the limit for all of the other text fields in the MySQL uploads table.

Thanks!
Greg Thomas







PHP Programmer - interactivetools.com