How to limit the number of lines (enter key) in text area field?

  • Profile Image
    Manuel
    Asked on August 29, 2013 at 11:54 AM

    Thanks for your answer! But it is not possible to limit how many times you can press enter so that the textbox will be longer and longer and longer. I am searching for a tool (or code) wich makes it possible, that users only can type within the textbox - like writing on a physical postcard.



    This is a re-post of a comment on New Editor Options for Text Area Fields

  • Profile Image
    Welvin
    Answered on August 29, 2013 at 01:44 PM

    Hi Manuel,

    Good day! Do you mean to limit the number of lines in the text area field? We don't have such function in our form that can do this, but I guess this is possible with using your form source codes (How to Get Form Source Codes) and adding custom Javascript for that to work.

    Someone from stackoverflow ask this and they seems to have the best solution we can apply: http://stackoverflow.com/questions/556767/limiting-number-of-lines-in-textarea?rq=1.

    Thanks

  • Profile Image
    Welvin
    Answered on August 29, 2013 at 02:04 PM

    I've made an example output here using the form source codes: https://shots.jotform.com/welvin/pages/limit-newlines-enter-kyes.html. You can see, I have it limited to 5 enter key strokes.

    If you'd like this method, please let us know. Finish you form and share it to us so we can get the source codes and apply the custom Javascript.

    Thanks