How can I limit the width of a text area?

  • Profile Image
    usmleny
    Asked on March 03, 2015 at 10:32 AM

    i have a text area and it is limited to 950 characters and i set the width to 65, but the submitter can type endlessly along the first row up to the 950 limit.  i want it to roll to the next row when say 65 characters are met.

     

    Actually much like this provide additional details grid, when i hit the end of the row over here it seems to automatically roll me ......     over to this next line. 

  • Profile Image
    raul
    Answered on March 03, 2015 at 12:12 PM

    You can modify the columns number on the field to increase/decrease the width of the field.

    Let us know if this is what you're referring to.
    Thank you.

  • Profile Image
    mayur5478
    Answered on March 03, 2015 at 12:14 PM

    When you add the text area filed , click on the properties . It has option of maxlength which sets the number of characters in each row. 

  • Profile Image
    usmleny
    Answered on March 03, 2015 at 12:19 PM

    Yes it seems the prolem was when i was testing it, i was typing 100's of characters without a space. once you use the space bar it rolls over.

     

    then next issue i am having, and i can see the solution, is to limit the rows to 15.  is that at all possible.

  • Profile Image
    raul
    Answered on March 03, 2015 at 01:02 PM

    You can also set the number of rows that will be displayed in the field by default.

    However, I see that you say "limit the rows to 15".

    Please note that when you change the values for the rows and columns you're modifying the appearance of the field. If you want to set a limit on it then you can only do this by characters or letters as you can see in the screenshot below.

    Let us know if you need further assistance.
    Thanks.

  • Profile Image
    usmleny
    Answered on March 03, 2015 at 01:07 PM

    ok so there is now way to lock it at 15 rows i am guessing. it will keep getting larger as they hit enter. i am trying to mimic somewhat this forum for students 

    http://www.usmle.org/practice-materials/step-2-cs/patient-note-practice2.html

     

    they have it locked at both characters and lines.. wondering if this is a possibility 

  • Profile Image
    raul
    Answered on March 03, 2015 at 01:15 PM

    Unfortunately, the only limitations that can be set on text areas are words and characters.

    In order to also limit lines, you would need to use the full source code of your form and a similar script as the one provided here: http://www.codeproject.com/Articles/56392/How-to-Limit-the-Number-of-Lines-and-Characters