Join Michael Murphy for an in-depth discussion in this video Establishing fast, efficient styles that are ideal for forms, part of Creating PDF Forms with InDesign.
Whenever you're starting a form project, or any project for that matter, one of the best first steps you can take is to establish a set of styles that will allow you to work consistently and efficiently throughout the entire project. In this movie, we'll set up a handful of useful dynamic styles that will serve as the basis for our text fields in our final form. In this document, I have the beginnings of a form layout. I have all the text information I need, but not a lot of the look and feel, like lines for filling in information or boxes or circles for check-boxes and radio buttons.
The best and most consistent way to get those things set up, to begin setting those up, I'm going to take advantage of InDesign's powerful styles. I'm going to start over in this area of the form and we'll zoom in there where we have all the registrant information. If I just select some of this text and open up my Paragraph Styles panel, which I can see here in the Advanced workspace, but if you're not seeing it, you can go to Window > Styles > Paragraph Styles and open it from there. All of the text here uses a style called Form Text Generic and what I want to do now is create an offshoot of that style that's specific to my form fields, which in print will appear as lines I can write on and in my PDF will be boxes I can enter text into.
So I'm going to select all of this text here and from the Paragraph Styles panel menu, I'll choose New Paragraph Style. I'll call this Form Fields and I'm going to build into this paragraph style some automation that will add the necessary lines I need wherever I use a tab or a right indent tab. To do that, I'm going to go to the GREP style area, choose New GREP Style, and for Apply Style, I need to pick a character style. Now, I don't have the character style I need, but I can create it right from here by choosing New Character Style.
And I'll call this character style Form Underlines and the only attribute I'm going to apply to it is here under Underline Options. I'll turn underlining on. I'll set a half point weight for my underline and a half point offset. I'll make sure that it's black and a solid line, and that's all I'll do. So now I've defined the character style from right within here and I want to apply that character style wherever this paragraph encounters either a tab or a right indent tab.
And we'll see that pay off in a moment. First, I'll clear out this default pattern and I'll click this Meta-characters icon here at the end of the field to access the Meta-characters menu. And from here, I'm simply going to pick what I'm looking for. The first thing I want is the first thing in the list, a tab. Clicking the icon again, I'll go down to the Match menu and choose Or. One more time. I'll go to the Other sub-menu and choose Right Indent Tab. So I've defined a pattern of a tab or a right indent tab.
And wherever either of those are encountered, the entire span of those tabs will have the Form Underlines character style applied to it automatically. I'll go back to the General menu and make sure that Apply Style to Selection is turned on and I'll click OK. And you don't really see anything change here because all I've really done is build a character style into this and not much more. But let's see what happens when I continue on. I'm going to put my cursor right here after Name in the first name line.
And I'll type in a en space using the keyboard shortcut Shift+Cmd+N on the Mac, or Shift+Ctrl+N on Windows. Following that, I'll hit Shift+Tab to insert a right indent tab. And as you can see, the entire span of that tab, all the way to the right side of this frame, is filled with an underline. I'm just going to select backwards using Shift+back arrow to select both the right indent tab and the en space, and I'll copy it to the clipboard. And I'll put it in at the end of next line, all the way until I get to City, which is followed by State and ZIP. Now, to conserve space in my form and on my page, I don't need to give each of these their own line. They're actually better off if I can consolidate them all onto a single line. So I'll do that by inserting an en space after the word City and then a regular tab. And it doesn't quite give me all the room I need, but we'll adjust that later. Then I'll use the keyboard shortcut Shift+Cmd+M to insert an em space, select this paragraph return and delete it, which brings State up onto the next line. After State, I'll insert another en space, another tab, add another em space, and delete the return following that. That brings City, State and ZIP onto the same line. After Zip Code, I'll insert another en space and a right indent tab that puts that line all the way to the end of this text frame. I'll close the Paragraph Styles panel to get it out of my way for the moment, and while I've consolidated these all onto one line, the distribution of space across this line really isn't appropriate. The ZIP Code, which only needs five digits, has the most space.
And City, which could conceivably be quite long, has the least amount of space. To fix that, I'll triple-click and select the entire line and then call up the Tab Ruler by hitting Shift+Cmd+T. Now initially, the Tab Ruler doesn't line up appropriately with the frame underneath, but if I just move the page a little bit down and hit this magnet icon in the Tab Ruler, it will snap to the top of the text frame. And now, this zero point is the zero point of my frame, and this helps me make my first guesses at where I want to start dropping some tabs in on this ruler.
So I'll go up above the ruler itself and I'll just click here to insert a normal tab. I'll let go and that gives me a decent amount of space for entering a city. I'll click again up here and I'll use this vertical line here as a guide for where I want to put my next tab and I'll drop that in here, leaving myself enough room for a two-letter state abbreviation and then plenty of room for a five digit ZIP code. I'll hit Shift+Cmd+T again to dismiss the Tab Ruler. And before I go any further, I want to be sure to save this variation on the form field style as a style of its own.
So, I'll open the Paragraph Styles panel again and from the Panel menu, choose New Paragraph Style. I'll call it Form Fields, City, State, Zip. It's based on Form Fields, so it'll inherit most of the formatting from that style, but it'll have its own unique tab settings. Apply Style to Selection is on, so I'll click OK. And I can continue on with the form. I still have these en spaces and right indent tabs in my clipboard, so I'll paste that in after E-mail, and here after Emergency Contact Name and Emergency Contact Phone Number.
But Phone Number and Twitter ID are two fields that I could combine onto a single line, so I'm going to do that in the same way that I consolidated City, State and ZIP. I'll add an en space after Phone Number, hit the Tab key, add an em space, delete the return, go to the end of the line. Add an en space after optional, hit Shift+Tab to add a right indent tab after that. Select the whole line, call up the Tab Ruler, locking it to the frame, and setting a tab at about the midway point across this line. You can see here that it gives me almost a 50/50 split.
I'll just adjust that tab so it's more evenly distributed between the two options. And then I'll dismiss the Tab Ruler again by hitting Shift+Cmd+T. I now have yet another variation on my Form Fields paragraph styles, so I'm going to save that as a style of its own by choosing New Paragraph Style from the Paragraph Styles panel menu and naming this form fields 50/50 since it basically splits the line in half. Apply style to Selection is on. I'll click OK and I'm basically done. I'm going to hit the Escape key to get out of Text Editing mode and then hit the W key to go to Preview mode so I can get an uninterrupted view of what I've got here.
And what I noticed now that I see these lines in is that I don't really have enough room for someone to write in their information. Assuming that my form is going to be printable and useable on paper, as well as a PDF, I need to take that into account and this is just way too crammed for somebody to be able to do that. Even in its PDF version, the fields themselves would be very long horizontally, but very shallow in height. And since I've used and applied styles here and my offshoot styles have a relationship to the styles they are based on, I can make an adjustment through here quite quickly and easily.
I'm going to put my cursor in this first line. Just select some portion of it. I don't have to select the entire thing. Go up to my control panel, making sure I'm in Character mode, and come over to the leading field and and Shift-click this little up arrow next to the field. That increases the leading to the next ten point increment, which, in this case, is 20 points. And to apply this across all of these field styles that I've created, I need only go to the Paragraph Styles panel. You can see here that the Form Fields style has a plus icon and the tool tip shows me that the override is 20 point leading. I'll just go to the Paragraph Styles panel menu and select Redefine Style. And it redefines not only Form Fields, but Form Fields, City, State, Zip and Form Fields 50/50 since they're all based on that root style.
I'll close this panel, change my view to fit the layout in the window, and here you can see my results. Very quickly and easily, using styles, I was able to establish the lines I need to create the look and feel of a form, make the necessary adjustments, and keep all of the appearance consistent, and make all the work as efficient and easy as possible.
- Designing hybrid (print/PDF) forms
- Working with styles
- Creating text fields
- Adding check boxes and buttons
- Using button actions to present contextual options
- Exporting and distributing a PDF form