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

June 7, 2005
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
June 7, 2005
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.
June 7, 2005
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
June 7, 2005
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!
June 7, 2005
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
May 11, 2005
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!
May 11, 2005
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?
May 11, 2005
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.
May 11, 2005
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?
May 11, 2005
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.