Dynamic Text Box size | Community
Skip to main content
February 28, 2005

Dynamic Text Box size

  • February 28, 2005
  • 33 replies
  • 26880 views
I would like to have a multi-line text box that starts as one line, then grows if the user adds multiple lines of text.



Currently I have the "allow multiple lines" field property checked, and the expand to fit height property checked. However, when I enter text in the preview I get a vertical scroll slider on the right as multiple lines are entered rather than an explanding text box. This verticle scroll slider certainly wouldn't be effective in a printed document.



-thanks
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

33 replies

March 24, 2009
Hi all, First of all thanks to everyone for the help!! It was much appreciated and I think I'm just about done! My only other problem is that my basic form spans 2 pages. I have the forms dynamic and they can span 2 pages (thanks An). My problem is that when the forms span into the next page my second page jumps down a page even if the form only takes about two line of the second page. As this is a horrible waste of space and I'm worried that people will miss the second page if it isn't initially visible is there anyway I can keep the text together on the second page? I've already tried checking the "keep with previous box" I've tried selecting in place "following previous". Is there any way to fix this 'cause I think I'm about an inch from pretending it's Friday and giving up!
March 23, 2009
Hi Jeffrey,



I have uploaded a fairly simple sample pdf that allows each textbox to be pushed down as more text are being entered. Study the hierarchy, mimic it from scratch, and let me know if you have any more questions.



http://www.megaupload.com/?d=VLMABG7I



P.S. A fairly simple requirement to make this work is to save it in Adobe 7 + dynamic format.



Good luck,

An
March 23, 2009
Hey,

So I have the forms set to auto-fit and I have each of the column that I want to expand set to "flowed" with the direction set to "Top to Bottom". What ends up happening when I enter text either the text writes over each other and makes a mess OR the lines go onto the screen instead of another page. I've tried wrapping the entire document in a sub-document and making it "flowed" and I've tried making just the sections that I want to expand "flowed" and same thing. I know that Adobe can do it I just don't know what' I'm doing wrong.



Thanks for the help,



Jeffrey
March 20, 2009
Jeffery Ward,



After you have checked off Auto-fit under Y: in Layout menu, make sure you wrap the text boxes in individual subforms and set the content to "Flowed" in the Flow Direcion of "Top to Bottom" (in the Object menu).



The key to a spanning pdf is Flowed subforms.
March 20, 2009
Hi,

I know this is an old topic thread but I'm really struggling with this issue. I have a two page form that has four dynamic text boxes, however, I can't get the dynamic boxes to work properly. Either the text flows over each other making it unreadable or it goes off the bounds of the page. What I want to happen is for everything in the forms to keep moving down as the text fields take up room even if it ends up spanning 3 or 4 pages. Is this possible?



Any help that anyone could give me would be much appreciated
November 18, 2005
As jimmy mentioned before the doNotScroll property was disabled - in fact any field property which you try to set. In 7.0.5 this restriction was lifted so you can now remove the scroll bar on text fields by using



event.target.getField("form1[0].#subform[0].TextField1[0]").doNotScroll = true;



in the initialise script of the field
November 16, 2005
I was having the same problem and found that by setting the parent subform(s) height property to "auto fit" fixed the issue. The scroll bar appears during editing but after the user exits the text field, the field grows vertically and the scroll bar disappears. Hope this helps.
June 8, 2005
Kent- I'm not an expert but your code sample appears a bit "off" to me. You appear to be declaring a new variable "f", setting it to the value of the field "description" and then setting the variable's doNotScroll property. Why would you set that property for a variable, which isn't seen by the user? Wouldn't you want to be setting that property for the field on the form?



Since it has been years since I took a Java class (and not used it since) and knowing that JavaScript isn't the same, I could be way off base. Perhaps this type of JS reference makes "f" actually refer to the form field. Anyway, after 32 years of programming experience, it just doesn't look right to me - but new languages do things different.
June 7, 2005
Jimmy... Am I missing a step here... On my Text Field, I have it defined with Multiple Lines and Rich Text Format... So the user can do Carriage Control and more...



If I want to take the Scroll Bar off of that field, where would I put the doNotScroll... In the Javascript, right?



On Initilize (Javascript)... I put...

var f = this.getField("Description");

f.doNotScroll = true;



Is this correct?



Kent
June 7, 2005
"doNotScroll" should still work with Acro forms. For xfa forms,exposure of the Acro JS interface is limited in version 7. The assumption was the XFA model should support everything that the Acro JS interface provided. Sometimes the XFA model supports it but it's not in Designer yet. Hopefully, it will be in the enhancement list for the future release.