Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

How to have text which overflows textbox to another textbox

Avatar

Level 1

This is something so basic in a word processor...but I cannot figure it out for the life of me. I have a "textbox" which in essence needs to flow over 3 pages. I created the three textboxes...set the source to the same name...now how to I get them to link together so the text can flow from one to the other to the other as text overflows the box?

12 Replies

Avatar

Level 10

Hi,

One solution is to use a single textfield and then allow this to expand - See Layout palette "Expand to Fit" for the height. Then if you set the page with a Flowed layout, then if it expands beyond a page Acrobat/Reader will create a new page for the content to overflow onto.

See an example here: http://assure.ly/g80MVY. Look for the textfields on Examples 3 and 4.

If you really need three textfields then you could use script to jump to the next field once the current one is full. Although this wont be the best user experience because the change in focus to the next field may happen when the user is in the middle of a word.

To implement this you would put something like the following in the full event of each textfield:

xfa.host.setFocus(xfa.form.form1.page2.textfield2); 

Hope that helps,

Niall

Avatar

Level 1

Wow...that appears to be a LOT of work for a very simple issue which other things can handle without any issue. I even watched a video put out by Adobe and they were talking about text threads and linking them that way. (just clicking on overflow character and dragging it to the next box) I guess it is a feature which is available in the Mac version which is not available in the windows version. Why?

Avatar

Level 10

Hi,

What you are describing sounds more like Adobe InDesign, which is page layout program. InDesign does allow you to link text objects, just as you have described.

However this functionality is not available in LiveCycle Designer, which is a Windows only program.

I wonder are you in the right forum. What program are you using?

Niall

Avatar

Level 1

I am in the correct forum...just looking at hopeful solutions. I figured that if you could do it in that program...that it would be ported to this one as well.

Like I said...it would appear to be such a simple thing and is available in many arenas...rather than forcing people to program it themselves.

Avatar

Level 1

The way I am doing this...I don't believe either solution which you have presented will work for my circumstance.

The problem is that I am importing this data from an .XDP file into the form. How do I get text which overflows one field in this case to automatically continue into another. Like I said...this should be such a simple thing yet I have not been able to come up with a solution to this yet.

Very bizarre.

Example:

Two text boxes...each allows 2 lines.

The .XDP file contains enough text that Adobe needs 3 lines. I want the first 2 to go into one field and the third to go into the second field. Typical overflow. In this case it is flowing from page 1 to page 2 because I have hit page boundaries.

Avatar

Level 4

Hi

I cant understand why you would need two text boxes?  Maybe you could explain in more detail.  As Niall says just set the form to dynamic and enable text fields to expand which it will do over multiple pages.  Livecycle Designer is a form creation tool.

The only way to implement your solution exactly is to use Adobe Indesign.  You would import your XML data from your Livecycle created form into Indesign ensuring that the mapping is correct in the first place.  Once the data has been transferred into InDesign into your template you could then export back to PDF.  I dont think that you could then re-export this data from this PDF as InDesign and LiveCycle use different methods to create PDFs.

Hope this helps

Avatar

Level 1

I can't make this a dynamic form as you suggest. This is a federally mandated form which I have added form fields on. In my program the people enter in the information (some of it on the form and some other stuff which the facility requires for themselves) and then I allow them to automatically fill in this federal form so that it can be saved/printed/whatever they want. I cannot change this as it will then not be accepted through the various regulatory agencies.

Seems simple ... right ... well there are a few fields which have in essence notes (and/or comments). Some of these are allowed to flow from the bottom of one page to the top of the next. I want to be able to import the .XDP file so that when the bottom area is full...it will put the remainder into the top of the next page.

Are you really telling me that Acrobat has no way of dealing with form fields which overflow in this manner and I have to go to a whole different product? WOW...this is such a simple concept that I can't believe there is no way around this.

Avatar

Level 1

I have tried to get this to work for weeks now. This is no simple task and I have yet to have it working properly. Is there any kind of assistance/examples which exist that I can take a look at. For such a simple thing, I have spent MANY hours trying to get this to work properly. Adobe really has no way to handle this? This is really getting to be bizarre.

Avatar

Level 1

I should add...I have found examples (overflow.pdf) from your site...but that only works with interactive input. I am working on form fields as filled in via importing from an XDP file data entered in a separate program. So I have the PDF in one form...XDP data in the other form...but most of the java scripting stuff that I have been able to find is only interactive.

Avatar

Level 2

Hi Niall!

Old thread, same question. I am also tied to the paper form in terms of layout. I have a paragraph with a field in the middle that extends over two lines:

some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text FIELD:                                          

                                                                   some text some text some text some text some text some text some text some text some text some text some text some text some text some text some text

Is there any way to allow the user to just continue typing? I tried your fix, and it kinda works - it leaves off the character that fills field1 (mid-word, like you warn). I could also set up a multiline field, indent first line and limit the character count, but since I am not using a fixed-width font, I have to be extremely conservative (basically, the number of upper case "W"s that fit - not enough).

I appreciate your expertise!

Avatar

Level 7

I don't know exactly how to tell you to implement this, but you can script the second field to check for a space " " at the beginning. If it's there, delete the space and continue with whatever is supposed to be there to remove the leading white space.

If there isn't a space, then you have a letter or a punctuation mark--both need to be with their previous characters. So, do a search in the first field for the last time you see a " ". tfText1.lastIndexOf(" ") will find the last space. You truncate the first field at that point and concatenate what's left to the beginning of the next field.

Something like:

tfText2.rawValue = tfText1.slice(tfText1.lastIndexOf(" "))+tfText2.rawValue;

tfText1.rawValue = tfText1.slice(0,tfText1.lastIndexOf(" "));

I think that should pretty much do it.

This is not a perfect solution. There are several ways to make it fail to work properly, but this at least gets your full word at the beginning of the second field. The OP would probably find it useful since his fields were being filled out by imported data. Your example seems to be more interactive. You don't want to constantly check for a space at the beginning and then delete that leading space. And you don't want to move words every time someone exits tfText1. So, a global variable that serves as a flag you can use to check against would help. Then there's still the problem of people editing the first text box. If they delete some words, then you need to move the words back up. That's a whole other set of scripting.

As it is, Adobe Reader alerts you when you reach the end of a field. Perhaps it would be best to just let that happen. Your users can figure out to continue typing on the next page. (You could even put a "hint" in the second field that says "Continue typing here." or something.)

Hopefully this at least pushes you in the right direction.