Skip navigation
Currently Being Moderated

Dynamic Text Box size

Feb 28, 2005 10:19 AM

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
 
Replies
  • Currently Being Moderated
    Feb 28, 2005 12:20 PM   in reply to (Marvin_McCreary)
    Expand to fit works only when focus leaves the field (i.e. if you tab out of the field). During run-time, the scroll-bar will appear in the area you have designed at design-time. Once you leave the field, the field is dynamically resized. If you wish the rest of the document to reflow, you must define the text field within a subform which is in turn a child of a flow content subform.
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 17, 2005 2:23 PM   in reply to (Marvin_McCreary)
    I am very new to Adobe Designer. In fact, this is my first project. I have tried and tried, but I cannot make a text box expand and flow the document. I have messed with everything, including downloading the sample from this site. I just cannot figure out what I am missing. Can someone walk me through the process of creating a expanding text box from a blank, new page? All I need is the steps taken to create a single expanding text box, and hopefully I will see what I am missing.
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 17, 2005 8:32 PM   in reply to (Marvin_McCreary)
    Chris,

    Here are the steps:

    1) Open a new form and drop a text field on your form.
    2) On the object inspector, click on the "field" tab.
    3) Check the "Allow multiple lines" box and set your desired property values.
    4) On the "layout" inspector, select "expand to fit" in the dimension that you want (i.e: width and/or height)
    5) From the hierrachy, right click on your textfield and select "wrap in subform".
    6) Select your new subform that just created. On the "Object" inspector, select "subform" tab.
    7) Choose "flow content" for type. Select "top to bottom" for flow direction.
    8 ) On the "layout" inspector, select "auto-fit" for both height and width.
    9) Now, you can test your form by click on "PDF preview" tab.

    Basically, above are the steps that you need. The idea is ,like David in previous post said, put your form field in the "flow content" subform.
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 18, 2005 7:09 AM   in reply to (Marvin_McCreary)
    Jimmy,

    Thanks for the response. I followed your directions to the letter, and still have the same results as before. I can type multiple lines, and I get the scroll bar in the box, but when I click off the field (tab out or click on the document elsewhere) all that happens is I get a plus symbol at the bottom right corner of my box, but it is not resized.

    This is driving me crazy. If it is possible, I can send off my simple single text box form for review. I just can't figure out what I am missing.
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 18, 2005 8:03 AM   in reply to (Marvin_McCreary)
    Make sure you have this saved as a dynamic PDF. It will not work for a static document.
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 18, 2005 8:07 AM   in reply to (Marvin_McCreary)
    MAN! David, you rock! That was is. I was attempting to preview from the unsaved document. Once I saved it as you suggested...it worked fine. Thanks! I was getting ready to toss this computer through a window...now thanks to everyone here...I can continue my project until the next problem!
     
    |
    Mark as:
  • Currently Being Moderated
    7. ,
    Mar 18, 2005 10:30 AM   in reply to (Marvin_McCreary)
    Tossing it through a window might hurt an innocent bystander. I prefer using a golf club or baseball bat (so long as they are from my old set!) :-)
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 18, 2005 10:35 AM   in reply to (Marvin_McCreary)
    Thanks for the tip, Sgreen!

    While we are all looking at this, I am working on the second half of my document, which requires the form to expand as the fields do.

    I have read above, "If you wish the rest of the document to reflow, you must define the text field within a subform which is in turn a child of a flow content subform."

    I am trying to make sense of this...hopefully I will figure it out.
     
    |
    Mark as:
  • Currently Being Moderated
    May 9, 2005 1:11 PM   in reply to (Marvin_McCreary)
    Ok I finally got the text to wrap successfully and it grows if you add multiple lines of text. However, on the form I have a bunch of fields and if for example, i type in field one, it grows right over the fields below. So it grows but the next fields below do not move to allow for the extra words typed in.
     
    |
    Mark as:
  • Currently Being Moderated
    May 9, 2005 2:11 PM   in reply to (Marvin_McCreary)
    Dianescanlon,

    You need to make sure all other fields below the growing text field is wrapped by a "flow content" subform. This way, when the text field expands, it pushes other fields downward.

    Hope this helps.
     
    |
    Mark as:
  • Currently Being Moderated
    May 10, 2005 6:47 AM   in reply to (Marvin_McCreary)
    Hi Jimmy,

    Thanks for the tip. I can get that to work but when I make sure every field is wrapped by a "Flow content" subform, all the fields move up to the left top corner of the page. I am importing a word document, i don't know if this makes a difference. I wish I could send you an attachment so you could try it. Let me know if there is a way you would be able to look at doc and if i could send it to you and at what address.

    Thanks.

    Diane
     
    |
    Mark as:
  • Currently Being Moderated
    May 10, 2005 11:46 AM   in reply to (Marvin_McCreary)
    Jimmy or anybody that cares,

    I am to the point of near tears now...I don't mind sharing my email address if you don't want to put it out on the forum I understand. My address is dianescanlon@afninet.com if you would rather just email me and not post it so I can send you my example. Basically, i think the problem may be that when i import from word, the orginial word document was not designed very well. So you have text and then text field next to each other. When I make sure the subform below the growing fields have flow content selected, for some reason it moves the text below the other fields and keeps moving them around. I have somebody else helping me and they are saying I need to start from scatch, i hate to do that because everything is set up, i just can't wrap and i have at least 40 word documents to convert to PDF.

    Thanks.

    Diane
     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2005 9:46 AM   in reply to (Marvin_McCreary)
    Diana,

    I had emailed you a working sample form that was designed in Designer 7. You can use it as a template for your other forms since they are similar in format and layout.
    Let me know if you have any problems.
     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2005 9:54 AM   in reply to (Marvin_McCreary)
    Hey Diane,

    You might actually want to nest some subforms. So wrap the fields that were getting moved in a subform but leave it positioned. Wrap the other section (which has the expanding field) and this section that you want to leave as it is positioned in a subform as well, only make this one flowed.

    When the field expands it will then push the other subform down which contains positioned objects, likely giving you the effect you're looking for.

    You might want to try a simplified version of this to get the idea of how it works then apply it to your own form.

    Try the following steps:

    1. Create a new form
    2. Drop a field on the form
    3. Set the field to have multiple lines and expand to fit height
    4. Drop a subform on the form (leave this subform, likely named Subform1, as Positioned)
    5. Add a text object and a text field into that subform you just added
    6. Select the default subform (or page, if you look in the Hierarchy inspector it is likely called "(untitled Subform) (page 1)")
    7. Set it to be flowed
    8. Save the form as a Dynamic PDF
    9. Preview

    If you fill the field with several lines and exit it should push the text object and the field that were in the positioned subform down. If it helps, you can turn borders on for the Subform1 so you can see what is happening.

    You should be able to apply this to your form in some fashion.

    Let me know if that helps.
     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2005 11:40 AM   in reply to (Marvin_McCreary)
    Thanks Paul. Ok everything works perfectly now. It wraps, it pushes everything down. I was delighted, now true test. I want people who just have Reader 7.0 (not whole professional product) to be able to fill out form correctly. It wraps fine for me when I save as PDF and open it in reader but it is just because I have professional too? Can someone who only has Reader fill this thing out?
     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2005 11:43 AM   in reply to (Marvin_McCreary)
    Someone with Reader can fill it out (requires 7.0 or 7.0.1) however they will be limited to printing rather than saving the data.
     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2005 12:05 PM   in reply to (Marvin_McCreary)
    Thanks for responding. I am aware of that limitation. But they can't make it wrap. I don't want a plus sign instead i want to type for example, 1000 characters and when you tab off the field it shows all 1000 characters. I can do exactly that when i open reader but somebody without full package cannot. Does that make sense?
     
    |
    Mark as:
  • Currently Being Moderated
    May 11, 2005 1:52 PM   in reply to (Marvin_McCreary)
    Sorry everyone for taking up your time. When i adjusted the fields to only expand for height and not for both height and width, it worked! Thanks so much everyone!
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 7, 2005 1:28 PM   in reply to (Marvin_McCreary)
    I hope someone can help...

    I am trying to stop the Vertical Scroll Bar from showing up on a Field... I want the user to type up to the size of the box on Multiple Lines, but no more, since I want to be able to print everything entered...

    I have tried doNotScroll = true;

    but this does not seem to work...

    Any Suggestions...

    Thanks
    Kent
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 7, 2005 1:44 PM   in reply to (Marvin_McCreary)
    1. Select the field in question.
    2. View the Object inspector, Field page.
    3. Check the "Limit Length" option.
    4. Set the "Max Char" field to the maximum number of characters the field can contain.

    You can figure that out mathematically or by simply testing the form with lines of "W"s (since they tend to be the widest characters).

    I'm going to suggest an option to automatically calculate the maximum number of characters that can appear in the field or some other mechanism that is more user friendly.

    I hope that helps!
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 7, 2005 1:46 PM   in reply to (Marvin_McCreary)
    Its the same old problem... MaxChars doesnt take into account if the User does Carriage Control... The only way I think I can solve this is by taking the Scroll Bar off the Field... Does anyone know how to do that?

    Kent
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 7, 2005 2:17 PM   in reply to (Marvin_McCreary)
    I think the closest to what you want to achieve are:

    1)Being able to scale down the fontsize to fit the amount of text in the field as the user tabs out of that field.

    2)Alert user when the text are overflowed as the user tabs out of the field.

    3)Unless you can write a javascript function that can detect keystroke and count number of characters while the user is typing, then what you want is possible.
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 7, 2005 2:19 PM   in reply to (Marvin_McCreary)
    Jimmy Thanks... Am I missing something here... The Adobe, Javascript Manual says that doNotScroll is available... Does anyone know how to make it work?

    Kent
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 7, 2005 3:03 PM   in reply to (Marvin_McCreary)
    "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.
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 7, 2005 3:17 PM   in reply to (Marvin_McCreary)
    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
     
    |
    Mark as:
  • Currently Being Moderated
    Jun 8, 2005 5:46 AM   in reply to (Marvin_McCreary)
    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.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 15, 2005 4:11 PM   in reply to (Marvin_McCreary)
    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.
     
    |
    Mark as:
  • Currently Being Moderated
    Nov 18, 2005 3:46 PM   in reply to (Marvin_McCreary)
    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]").doNotScrol l = true;

    in the initialise script of the field
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 20, 2009 11:24 AM   in reply to (Marvin_McCreary)
    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
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 20, 2009 1:23 PM   in reply to (Marvin_McCreary)
    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.
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 23, 2009 5:51 AM   in reply to (Marvin_McCreary)
    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
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 23, 2009 11:51 AM   in reply to (Marvin_McCreary)
    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
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 24, 2009 8:21 AM   in reply to (Marvin_McCreary)
    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!
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)