Limiting the size of the multi-line text field
By default, the multi-line text field has a limit of 3000 characters.
With some Javascript code, this limit can be reduced. The following code will limit the field to 500 characters. Change the boxlength value to set your own limit.
Insert the following code under Settings > Global Javascript:
<script type="text/javascript"> var boxlength = 500; if(document.getElementsByTagName('TEXTAREA')){ var txts = document.getElementsByTagName('TEXTAREA'); for(var i = 0, l = txts.length; i < l; i++) { var func = function() { if(this.value.length > boxlength) { alert('Maximum length exceeded: ' + boxlength); this.value = this.value.substr(0, boxlength); return false; } } txts[i].onkeyup = func; txts[i].onblur = func; } } </script>
-
Anonymous commented
Can this code be used to increase the text lenght of the 200 character text field?