cancel
Showing results for 
Search instead for 
Did you mean: 
brianknight
Nintex Newbie

How do I limit the number of lines in a multi line text box

Is there a way to set a limit on the number of lines that can be entered on a Multiline textbox?  I know I can set the resize at runtime to No, but that doesn't prevent someone from continuing to type.  Our users.  If I allow the resize, we could have situations where the form becomes out of wrack when it is converted to PDF for printing.  If I turn off resize, some of the content of the control could be missing.  Simply asking people to not go over 5 lines just won't work.  I've created a multiline column and set the number of lines to 5, but that doesn't seem to work either.  What am I missing here?  I see several posts on imposing character limits.  I suppose that would work, but could be real tedious as i have multiple multiline text boxes and each one is a different size.  Trying to figure out how many  characters would fit in each box would be a bit of a pain.

Labels: (1)
0 Kudos
Reply
4 Replies
brianknight
Nintex Newbie

Re: How do I limit the number of lines in a multi line text box

Haven't seen any responses to this.  Anyone have some thoughts or ideas?  If I allow the control to behave the way natural way all my page breaks get messed up when I convert to PDF.  I've tried to attach the controls to a list column and set that to a specific number of lines, but that doesn't seem to work.  Any ideas?

0 Kudos
Reply
brianknight
Nintex Newbie

Re: How do I limit the number of lines in a multi line text box

Checking to see if anyone has ran into this issue before.  Is there a way to stop the multi line textbox from growing beyond what I've set as the size on the form?  I can't have the control expand and I cannot allow the person to keep on typing and the contents become hidden.  This is really important as the document will become convereted to PDF and when that happens the control has to be a specific size.  I cannot have the control grow or hide content within the control.  If there is a way to prevent the user from typing beyond the set size, I do not see it.  Does anyone have any ideas here?

@sporcincula 

0 Kudos
Reply
rameshmusham
Nintex Newbie

Re: How do I limit the number of lines in a multi line text box

May be you can try this and let me know is it helpful for you.

 

NWF$("#"+jsvar_MultiText).focusout(function(){

var len =NWF$("#"+jsvar_MultiText).val().length;
if(len> 100){
alert("You can't enter more than 100 chararcters");}
});
0 Kudos
Reply
brianknight
Nintex Newbie

Re: How do I limit the number of lines in a multi line text box

Thank you for your response.  Unfortunately, this did not not work.  I'm assuming this is a JavaScript code. I was able to type in way more than 100 characters into any of my multi line text boxes and there was no alert appeared nor was I prevented from going over 100 characters.

0 Kudos
Reply