Skip to main content
c kim
Known Participant
March 15, 2017
Answered

Custom line spacing in a fillable text form field

  • March 15, 2017
  • 11 replies
  • 116127 views

My client has a word document with lines for applicants to print out and fill in, or "fill in digitally." Is there a way to create a text form field with "custom" line spacing? I know you can do it when you preview the document, but is there a way to actually "embed" that data in the text field so the user doesn't have to do it when filling out the form.

Correct answer ShannonReinholdt

I figured it out, this can not be done in indesign which is something they need to work on because it defeats the idea of making a nice designed interactive pdf form.

In Acrobat

  1. Choose Prepare Form > Select the text field and right click > Select Properties
  2. Select "Options" tab and make sure Multi-Line and Allow Rich Text Formatting is selected > Close this window
  3. Exit out of Prepare Form mode
  4. Add some text in the text field > Highlight it and press CTRL + e > this will open up text field properties > select more... now you can edit your paragraph spacing.

NOTE: The only thing I noticed is that the text field might not hold onto those properties if the text is deleted, it seems to have reverted back to the default spacing.

2nd option, make multiple text boxes and link them together, again this can not be done in indesign and only done in Acrobat

  1. Make multiple text boxes and name them properly. Example Text_1, Text_2, Text_#, etc
  2. Right click on the first text box and open properties menu
  3. In the "Options Tab" ensure "Scroll long text" is turned off
  4. Next open up the format tab > Select Format Category : Custom > and open up the Custome Keystroke Script: by selecting "edit"
  5. Enter this java script

if (event.willCommit || event.fieldFull) {

    this.getField("Text_2").setFocus();

}

Do this for all text boxes and make sure to write the name of next text field into the java script. This will tell the text fields that when one is full, to carry onto the next text field assigned.

11 replies

Participating Frequently
August 29, 2024

Now, this is just freaking weird.

Issue:  Lines double spaced in a form field "Dropdown" List.

 

Resolved - Here are instructions to what I did:

1) I set up a dropdown list

2) I used Cambria 10 font

3)  When I tested the dropdown list -- all the line items were double or triple spaced. 

4) So, I attempted to resolve the line spacing issue in my drop down list by:  Changing the font to Courier and used size 10

5) Line Spacing resolved in the dropdown list to Single Line spacing as a list should be.

 

This sounds like not all fonts are built-into Adobe?  Not sure.

Hope this helps. 

 

Thanks,

Jyn 

kenneth Klim
New Participant
September 19, 2023

Recent Multi-line text form field vertical spacing issue:

We have been using a PDF form, last revised in 2018.  One field, "Description of Work" has the attributes:

Appearance: Helvetica 12 point,

Options: Multi-line

(Note that 'Allow rich text format' is not selected).

We have had two occurrences (separate documents) where the vertical spacing of the text was mis-aligned with the form.  Editing the form field shows proper alignment.  After leaving that field, the misalignment occurs. 

 

I have repaired a specific issue by copying the text and pasting back into the same field. This suggests invisible formatting, i.e. field properties.  Ctrl+E claims no properties exist.

 

Acrobat 2023 Continuous Release, 2023.006.20320, 64-bit

Participating Frequently
September 11, 2023

I have a solution not yet listed here, which allows me to create a notebook-style image that a text field can laid over and have all the inputted text land on a line. 

  1. Create a text box and fill it with placeholder text,
  2. Go to "paragraph rules" in the top-right hamburger menu (or option+commnd+j).
  3. Turn the rule on, and, using the preview, adjust it to where you want your lines to end up.

 

At this point, every time you create a break in the placeholder text, a line will be drawn under the last line of text in the paragraph. So create a paragraph at the bottom of the page, then:

  1. Draw out as many lines as there are lines of text.
  2. Place one of the lines over the first "paragraph rule" on your page.
  3. Place another over the last paragraph ruling. 
  4. Select all the lines and use the distribute function to space all of your lines evenly. 

Now your users can fill out the form with a pen or electronically, and it won't look funky.

 

New Participant
May 10, 2024

I tried this but I feel like the readability is poor with the text and lines all so close together. I wish there was another way.

New Participant
June 21, 2023

My issue was that I needed to space out numbers for SSN on a W-9 Form. I had success by going to the text field properties.

 

  1.  Create the text field for the block of letter/numbers you want. 
  2. Double click the text field to open "Text Field Properties"
  3. Under the options tab, uncheck every box except the last box "Comb of"
  4. Change the number of characters to the number you need. (Ie. if you only need the first three digits of your SSN, Make it "Comb of '3' characters.
  5. If you have multiple blocks like this, like an SSN, you will need to make sure each one has a unique name Text Field name. You can find this in the "General" tab of the "Text Field Properties" 
  6. So for an SSN, I have 3 text fields. SSN_1 (set to comb of 3), SSN_2 (set to comb of 2) and SSN_3 (set to comb of 4)

 

I hope that helps you or others with this type of spacing issue. 

zydrius
New Participant
October 21, 2020

On Mac it's Cmnd E. But hey, it looks like everybody forgot it for a while. Camon, have You never wanted to change leading i text field? 

New Participant
July 27, 2020

I know this isn't exactly the solution people are looking for but I just figured I would let people know how I deal with this kind of issue when converting application forms that were originally made to be printed out and written in to fillable forms (my issue was the person I was helping make these for wanted them to still be able to be printed and written on for people who didnt want to do them online). If you are creating a form and want the line spacing to match the text form field this is what I do. All of this is done in Acrobat.

1. Choose Prepare Form > Insert the text box form field and resize it to span however many lines you need to cover.

2. Select "Options" tab and make sure Multi-Line and Allow Rich Text Formatting are both checked, and Scroll Long Text is unchecked.

3. Select "Appearance" tab and make sure the Font Size is set to anything other then Auto and select your Font, then close out of the properties box.

4. In the top right corner select "Preview" and type whatever you want into the text form you just created to fill the entire space, then once its full click "Edit" to go back to the "Prepare Form" section. (your text box should still be full)

5. Go to the "Tools" pane and select "Edit PDF"

6. Click on each individual line that you want to line up under the corresponding text and drag the line until its in the postion you want it to be in. (Do this for each line within the text field so it lines up directly under the text.

7. Go back to "Tools" and select "Prepare Form" again, go into "Preview" again and select all the text you had used to fill your text box and delete it.

8. Click "Edit" in the top right corner again to bring you back to "Prepare Form" and save your work.

This should at least set it up so the lines will be directly under the text whenever someone uses the fillable form fields to fill out whatever it is. Hope this helps someone for the time being. 

 

New Participant
February 7, 2023

This was extremely helpful!

 

Participating Frequently
April 11, 2020

Hi Shannon, 

My version of adobe acrobat dc doesn't have a format tab. Trying to figure out how to tell the document to apply the javascipt  to line1 of the document.  I'm not at all familar with javascript.  What would I need to add to the script you provided? 

 

Many thanks,

Jenna

try67
Community Expert
April 11, 2020

Click on Tools - Prepare Form and then click on "More" at the right side of the window and then on "Revert to Acrobat Form". In the future, do not tick the box that says "This document requires signatures" when creating the form.

Inspiring
December 12, 2018

I'm having the same issue. The button text field options to modify fillable text field only allows the modification of font choice, font size and color (see image bottom right in button and forms section) but it doesn't allow leading options which is silly because that's a huge part of a document layout.

You'll see in Indesign my text field should allow for 4 lines of text to be filled in

Yet when a person is filling it out the leading does not match the lines I have laid out so that when it prints the text will be on the lines.

The other option is to have one text field and to carry it over like you would if you have two columns but that method also doesn't work because the text fields don't stay linked so upon export to pdf only the first line shows up as a typable field. 

ShannonReinholdtCorrect answer
Inspiring
December 12, 2018

I figured it out, this can not be done in indesign which is something they need to work on because it defeats the idea of making a nice designed interactive pdf form.

In Acrobat

  1. Choose Prepare Form > Select the text field and right click > Select Properties
  2. Select "Options" tab and make sure Multi-Line and Allow Rich Text Formatting is selected > Close this window
  3. Exit out of Prepare Form mode
  4. Add some text in the text field > Highlight it and press CTRL + e > this will open up text field properties > select more... now you can edit your paragraph spacing.

NOTE: The only thing I noticed is that the text field might not hold onto those properties if the text is deleted, it seems to have reverted back to the default spacing.

2nd option, make multiple text boxes and link them together, again this can not be done in indesign and only done in Acrobat

  1. Make multiple text boxes and name them properly. Example Text_1, Text_2, Text_#, etc
  2. Right click on the first text box and open properties menu
  3. In the "Options Tab" ensure "Scroll long text" is turned off
  4. Next open up the format tab > Select Format Category : Custom > and open up the Custome Keystroke Script: by selecting "edit"
  5. Enter this java script

if (event.willCommit || event.fieldFull) {

    this.getField("Text_2").setFocus();

}

Do this for all text boxes and make sure to write the name of next text field into the java script. This will tell the text fields that when one is full, to carry onto the next text field assigned.

New Participant
August 14, 2019

Thank you! This works like a charm, with one HUGE ISSUE ... it drops a "letter" from the word when it tabs from one line to the next. Has anyone found a way to avoid this issue?

I wish Adobe would just program in a line spacing tool to the Text Field Properties, it's 2019 ... come on now!

New Participant
July 4, 2018

I found the answer in another thread. How do I change the line spacing in a multi-line text field on a PDF form? (on MAC)

Works on Windows as well.

Thom Parker
Community Expert
February 8, 2018

Yes, there are a couple of ways to do this.

First the field must be set to be Rich Text

1. Enter some text and set the line spacing. Then delete all the text but on space.  This space will hold the formatting. This method is not reliable because if the user deletes the space they loose formatting.

2. Use JavaScript to set to line space formatting after the user has finished entering the text. A validate event works for this.

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often