Limit the maximum number of characters per line in the TextField, help please

Hello Livecycle designers!

It would be great if you could help me with the following problem. I have a TextField with 5 lines (limit of the viewable area and the exact height) and I want to limit the maximum number of characters per line up to 10 (as well as the total in this field at 50, but I'm able to do with the option "time limit, max characters").

As far as I know can be done only by the script so if you change that I wrote:

lines of the var = xfa.event.newText.toString().split('\n');

i = Lines.Length,
maxChar = "10";

If {(maxChar)
While (I--> 0) {}
If (rows [i] .length == maxChar) {}
XFA. Event.change = "\n";
}
}
}

and actually who works very well when instead of '\n' in the 1st line, I put any character (e.g. ' |' and I won't pretend that ' |' is my new \n).

So the main problem is to split the text entered by the user in lines (the '\n' is unfortunately not working). So the solution to this problem would somehow split my Textbox in lines (in table) after the user presses ENTER.

I'd appreciate any help here, so if you have just 2 minutes of your time, please help me.

Hello

I have rebuild your idea... that is the result.

var Input = xfa.event.fullText;

var FullLength = Input.length;

var SplitLength = 10

var SplitParts = Math.ceil(FullLength / SplitLength)

var JoinString = "";

 

for (var i = 0; i)<= splitparts;="">

{

SplitString = Input.substring (0, SplitLength);

Entry = Input.replace (SplitString, "");

JoinString = JoinString + SplitString + "\u000a";

}

xfa.resolveNode("Textfield2").rawValue = JoinString;

Tags: Adobe LiveCycle

Similar Questions

  • Multi-line textitem - maximum number of characters per line

    Hello specialists forms,.

    Is there anyone know how to set the maximum number of characters allowed per line for a multiline text item?

    Say: the number of characters per line will be 75. When the user reaches this limit, the text element will wrap the current Word and move the cursor to the next line.

    Any advice/solution/insult would be appreciated. Thank you

    The maximum number of characters in a line in a multiline text item is dictated by the width of the element - using the standard text element object. You can use the Rich Text Java Bean that could give you the functionality you're looking for.

    Craig...

  • Version 2 (9.2) - the maximum number of characters allowed per line is 32767 really?

    Hi all,

    The maximum number of characters allowed per line is 32767 really?

    The [Oracle documentation | http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96612/u_file2.htm#1002215] specify that the maximum size of a row of utl_file is 32767octets, but only accepts the 32766.

    If I try to include a line with 32767octets, the following error occurs:
    + "ORA-29285: error writing the file." + "

    Philips

    What new line character at the end.?

    max_linesize - the maximum number of characters per line, including the newline character, for this file. Minimum 1, maximum is 32767

  • Maximum number of characters in the subject line?

    Hello

    What is the maximum length of characters allowed in 'object'?

    Also - anyone can guide the best character of subject line length. !!

    Thank you

    POOJA

    Hi Pooja,

    Maximum number of characters allowed is 250. Its best if we keep the subject line short and simple, try to keep the characters limited to 50 to 100.

    Hope this helps you.

  • IR - CubeQuery - no limit to the maximum number of columns or lines?

    In IR query processing cube, is there a limit to the maximum number of columns or lines? If so, how?

    When downloading of the results, are there limits to the maximum. lol the columns or lines as well?

    All documentation on its limits?

    Please help someone?

    Columns cannot be more than 256 upto Hyperion Interactive Reporting Studio 9.2.

    No, there is no limit to the maximum number of rows. It depends on the memory and available space on your machine.

    Please correct me if I'm wrong.

    I hope this helps.

    Kind regards

    Manmohan Sharma

  • What is the maximum number of characters that a 2D barcode can have with the symbology PDF417 Matrix? How to solve the problem of code bar having too much data?

    What is the maximum number of characters that a 2D barcode can have with the symbology PDF417 Matrix? How to solve the problem of code bar having too much data? I'm incorporating data of the bar code under a button field. But when the data is large, the problem occurs.

    Apparently the theoretical capacity of the PDF417 barcode is 1850 characters or numbers in 2710. Of course, the actual capacity depends on the size - more square inches, more data. But before the theoretical limit, that you can reach practical limits in scanning technology so test carefully with all models of planned barcode scanner.

  • What is the maximum number of characters allowed in a text field large to Eloqua?

    Hello

    I want to know how many maximum characters allowed in a text field large to eloqua?

    Thank you

    Sanny Mual

    Hey Sanny,.

    The maximum number of characters allowed in the text field large eloqua is 32000.

    See you soon!

  • Zoom in French - to the acrobat reader do not reduce the number of words per line to fit screen

    Zoom in French - to the acrobat reader do not reduce the number of words per line to fit as screen micorsoft Word knows to extend this feature is the free acrobat reader - or only exist in a paid product Adobe - and how is - this product called from adobe on its less expensive way for Windows 10 .it.

    You don't ask to convert to word. You seemed to ask if you could zoom in on a pdf document and have the text reformatting "As Microsoft Word can do". The answer is higher. Drive abyy fine will not redistribute the text either. Is neither Adobe Acrobat

    But you touched kind on your answer. With ExportPDF or Adobe Acrobat, you can convert the PDF file to a Word document that will be redistributed as you want. But this is not a pdf file. It will be a Word document.

  • Maximum number of characters in the file of travel

    Is there a maximum number of characters that can be a file of saved travel? When I save a file move with 12 characters or less, filter > distortion > dispersion works well; When I save the file even with 13 characters, nothing happens when I try to apply the filter. Obviously, the solution is to save the files with maximum 12 characters. I was just wondering if this is a known limitattion. Thank you.

    It is probably not the name of the file, but too long path name.

    What's the file buried deep into a folder hierarchy?

    If this is the case, move it up a little!

  • maximum number of characters used in a column

    Hi all
    Suppose I have a table named employee with two fileds (Emp_id and name)
    I need the query to find the maximum number of characters used in the column name until now.

    CNA anyone help me.

    combine the MAX and LENGTH

    as in:

    SQL> select max (length (ename))
      2    from emp
      3  ;
    
    MAX(LENGTH(ENAME))
    ------------------
                     6
    
    SQL> 
    
  • I reinstall xp on my toshiba laptop Dungeon wonders for SDBUS. SYS file that is not on the cd help please, I did once before without this problem

    I reinstall xp on my toshiba laptop Dungeon wonders for SDBUS. SYS file that is not on the cd help please, I did once before without this problem

    Please try to use different CD or simply remove the CD then insert again the installation request for the files.

  • maximum number of characters in the popup of WebHelp?

    I'm pasting text in a pop-up window in WebHelp, but the text is being truncated at some point. Is there a maximum number of allowed characters?
    Thank you!

    Hi techscribe. If you use popups only text, these are limited to 255 characters. Better to use a topic and a link using popup so you have more text than that.

  • How to get the num maximum and average bytes per line per TABLE?

    I want to know the maximum and the average number of bytes including a row in a table
    uses. Can I somehow this knowledge (and these values in the form of two output columns)?

    Peter

    user559463 wrote:
    I want to know the maximum and the average number of bytes including a row in a table
    uses. Can I somehow this knowledge (and these values in the form of two output columns)?

    analyze tables and check the USER_TABLES view, pay attention to the AVG_ROW_LEN column. Not sure how the maximum number of bytes

  • Is there a maximum number of characters with Dreamweaver search report?

    Hello

    I am trying to produce a text file for import in Textwrangler for further manipulation with the search of Dreamweaver functionality.

    I asked to find everything in a particular tag. However, in the report, the lines with the largest number of characters are not complete - it of like Dreamweaver indicates a fixed number of characters, and no more. Do you think this could be the case, and if so, is there something I can do?

    I'm on a mac using CS5.5

    Thank you very much

    Lisa

    < mm_displaystr > <! [CDATA [< section class = "section" > < h1 > A family of donor insemination: 'All I Wanted was a baby' < / h1 > < p > < span class = "a connection" > DVD </span > < span class = "a connection" > 2001 < / span > < span class = 'about' > 65 Minutes </span > < / p > < p > < strong Discussion > discover infertility]] , saying children and the support of their church etc. < facilities > < / p > < p > two donor insemination families who have made the decision to tell their children about their origins. Throughout the history of the use of Dl since it began in the 1930s, its increase gradually in the next three decades, although carried out furtively in private clinics, until the 1970s when it was admitted in the National Health Service, the practice had been to advocate that parents should not tell the children about their origins. The anonymity of the donors and the veil of secrecy made these acceptable and possible pragmatic advice to follow. It remains the standard for most parents to Dl right now. How this works in practice and how possible it is to maintain secrecy for a lifetime are an essential part of the study of parenting. However, some clinicians have begun to question this approach and to advocate for their patients that they should consider a more open approach. It is also far more open discussion of the present in the media and elsewhere. < br > < br > Dl two families in this series of videos participated in a clinic of Dl that had this more open policy. However, they themselves had decided, for the reasons given in the videos, they should tell their children about their origins Dl. Why and how they put that into practice emerges in their conversations. In a family with two children, covers the conversation:-there are two sons after donor insemination. The discussion of torque:-their hopes of having children and their discovery of infertility "their decision to use donor insemination." How they came to the decision to tell the children about their origins. Conversations with their children on this subject. [[Church support and]] > < / mm_displaystr >

    If you are competent in regular expressions, you should be able to use the search tool of TextWrangler and the box with Grep. A quick glance at the manual of TextWrangler seems to indicate that the Grep syntax used by TextWrangler is the same as used by Dreamweaver compatible regular expressions Perl.

  • After inserting a mock-up (LOGO PNG) in my shine card it becomes transparent, only vague lines are visible. Help, please!

    Im working on a film for the introduction of logo in After effects. Unfortunetely when I insert my composition (PNG or JPEG) in my card smash it becomes transparent. This is why the logo can not be seen. Only vague lines can be seen. Is that a graphics card problem or can it be resolved?


    Help, please!

    Thank you very much for the quick responses. I found the problem myself. I did not put my opinion shatter on "renders"!

Maybe you are looking for