Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Making a text box expand as you type into it?

Avatar

Level 2

I was wondering if it is possible to make a text box (or any kind of box) expand as you type into it.  Currently the box does not have a caption, I simply want to allow the value box to expand as i type into it.  It would also be great if it would expand to another page...does anyone know if this is possible and if so how can i do it?

41 Replies

Avatar

Level 6

Hi,

There is one way how you can reach what you want.

First set your TextField Allow Multiple Lines

1.JPG

Second, at the Layout tab set Expand to fit(heigth ar width)

2.JPG

After you will insert text to TextFiled it will be expanded.

Example attached.

BR,

Paul Butenko

Avatar

Former Community Member

The box will not expand until you exit the field. While you are in the field typing ...scroll bars will appear.

Paul

Avatar

Level 2

The box is not expanding, when i am done typing there is a "+" sign in the lower right of the box.  I tried all that you said before i origonally posted and got the same result...any ideas why this is not working?  I could not open your attachment as well.

Avatar

Former Community Member

The form must be saved as dynamic as well and the root subform must be flowed for expansion to occur.

Paul

Avatar

Level 2

can you please explain to me how to do both of those.  I am a newbie and apologize for that.

Avatar

Former Community Member

It woudl be easier for me to show you on your form ...can you post your form and I will tell you what I changed.

Paul

Avatar

Level 2

Here is the form.  I would really like this to also go into the next page if needed as well.  I also need to be able to see what i am typing as i am typing it.

Thanks for anything you can do for me...please try to explain how you do what you do so i can try and learn myself.  I think that i was able to add a subform and ticked it to "flowed" properly.

Avatar

Level 2

I have a question along these lines also. I have been able to get my text box to expand but then it overlaps the section below it. Is there some code I can use for the subform to get  the next subform to move as the text field it expanding?

Avatar

Level 6

Hi,

you subforms shoud be flowed. If you will post your form i'll check it.

BR,

Paul Butenko

Avatar

Level 6

Hi,

I made your flowedText subform flowable and now it working fine.

See attach.

BR,

Paul Butenko

Avatar

Former Community Member

Well if it's not in designer itself, I wouldn't even think about programming this as each and every font has different widths and sizes. Meaning if you want to expand it correctly you'll need to know about everything about the fonts in the first place and well you know as well as I do ... it's a crazy man's job.

Avatar

Level 2

Pguerett,

Were you able to figure out where i went wrong?

Avatar

Level 10

Hi Wrenm, I took a quick look and fixed things up for you.

I setup and named some subforms:

  • subMain is the main subform container that holds everything else, it's set to Flowed and Allow Page Breaks.
  • subHeader is the info at the top of the form, it is set to Positioned.
  • subNote contains your text box and is set to Flowed and Allow Page Breaks. I made the textbox inside the full width and opened it up larger for a starting size. I set the text box to allow Rich Text so you can do bold, italic, etc.
  • subFooter contains your footer info, it is set to Positioned and will follow the text box expansion. You could also put it on the Master page and have it at the bottom of every page.
  • on the Master page I brought the content area down a bit and put a "Page n of m" field at the top for page numbering (it's on the Custom Object Library palette).

I think that should get you started!

Oh, and saved the form type as "Adobe Dynamic XML Form".

Avatar

Level 2

Juno,

Thanks, although i have not been able to review your changes because the document is still queued.  I do have one question though, how do i save as adobe dynamic xml form???

Avatar

Level 10

File->Save As -- the "Save as type" dropdown is where you pick the file type.

As the file is still queued here's a link to download it:

https://share.acrobat.com/adc/document.do?docid=6dc5417d-fe5e-4809-926a-90633089b270

Avatar

Level 2

i am getting an error message when i click on the dl button.

Avatar

Level 10

Weird, don't know what's up with that -- acrobat.com seems to be having trouble.

Give me your email address and I'll send it to you.