How can I limit the width of a text area?

  • usmleny
    Asked on March 3, 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. 

  • raul
    Replied on March 3, 2015 at 12:12 PM

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

    How can I limit the width of a text area? Image 1 Screenshot 20

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

  • mayur5478
    Replied on March 3, 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. 

    How can I limit the width of a text area? Image 1 Screenshot 20

  • usmleny
    Replied on March 3, 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.

  • raul
    Replied on March 3, 2015 at 1:02 PM

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

    How can I limit the width of a text area? Image 1 Screenshot 30

    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.

    How can I limit the width of a text area? Image 2 Screenshot 41

    Let us know if you need further assistance.
    Thanks.

  • usmleny
    Replied on March 3, 2015 at 1: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 

  • raul
    Replied on March 3, 2015 at 1: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