Skip navigation
EBPCraig
Currently Being Moderated

Multi line textbox control

Apr 7, 2012 10:21 AM

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?

 
Replies
  • George Johnson
    11,671 posts
    Aug 11, 2002
    Currently Being Moderated
    Apr 7, 2012 11:33 AM   in reply to EBPCraig

    I would suggest a different approach that is demonstrated with the following file: https://acrobat.com/#d=AG6oZ3bi3DYHokxDPeWN7A

     

    The point is the lines are only really helpful when filling out the form by hand. When filling the form electronically, the lines can be obscured.

     

    I've never seen a satisfying solution of the type you're looking for.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points