What can we do to make it easier to design with Wild Apricot?

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>

0 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    anonymous_96.44.245.50 shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Anonymous commented  ·   ·  Flag as inappropriate

        Can this code be used to increase the text lenght of the 200 character text field?

      Feedback and Knowledge Base