1 Reply Latest reply: Apr 7, 2012 11:33 AM by George_Johnson RSS

    Multi line textbox control

    EBPCraig

      Hello, I have a PDF with multiple separate lines that I'd like to act like normal flowing text.  So the user would just keep typing and the text should automatically just continue onto the other lines. 

       

      So I have four fields (marked Description1, Description2, etc.).  When you get to the end of Description1 it should go to Description2 and so on.

       

      I got this to sort of work with the following JavaScript:

       

      if ( event.fieldFull || event.willCommit ) {

        this.getField("Description2").setFocus();

      }

       

      There are a few problems with this:

       

      1. There is an annoyinig beep.  I could get over that but it's annoying
      2. the last character is consumed.  So if you type ABCDE and it breaks after B, the first line will show AB and the second line will show DE
      3. Let's say the user wants to edit his paragraph.  He can't just hit backspace and go from one field to the next (or arrow keys for that matter). 

       

      So with all of this it doesn't feel like editing a paragraph..  I feel that a much more complex JavaScript would be needed to accomplish what I'm looking for but I don't know how to write it.  Can anyone offer any suggestions?