is now part of CreativePro.com!

Making Fill in the Blank Labels for Contracts and Forms

8

Toby writes:

I’m making a form where each section has a paragraph with fill-in-the-blanks and I need to make parenthesis under each fill in the blank, such as (noun), (adjective), (verb), etc.

It sounds like you’re either making a formal legal contract or one of those fun Mad Lib forms! Your question caught me at just the right time, because I was dangerously close to actually getting some work done, and trying to figure this out was the perfect distraction to help me procrastinate!

Plus, Ashley just wrote this great piece outlining various ways to make lines in forms.

There are several ways to create this kind of effect:

Madlib1

The tricky part of this is being able to quickly edit the text beneath the line and always keep it centered. The good news is that, although it takes a little time to set up once, you can apply it very quickly from then on. My favorite method involves creating a text frame that you anchor into the story:

Madlib2

The text inside the frame is set to a paragraph style with a centered horizontal alignment, so that it always remains centered in the frame. It is also given a Rule Above that extends the entire Column Width:

Madlib3

Finally, I made the text smaller and set the baseline shift to a negative number. I’m sure you could do this without the baseline shift, but it was the first thing I thought of.

Once you anchor the frame into the story, you can use Object > Anchored Object > Options to set the Inline Offset to the same size as the height of the frame itself? but negative. In other words, if your text frame is 8 points high, then set the offset to -8 points.

Madlib4

Once you set up your paragraph and anchored object formatting, be sure to save them as a paragraph style and object style so you can apply them quickly later!

If you’d like to play around with this yourself, feel free to download this snippet file and Place it into your InDesign document. (If your browser adds “.txt” to the end of the name upon download, just remove that… it should end with .inds.) The snippet will add a paragraph and object style for you.

David Blatner is the co-founder of the Creative Publishing Network, InDesign Magazine, CreativePro Magazine, and the author or co-author of 15 books, including Real World InDesign. His InDesign videos at LinkedIn Learning (Lynda.com) are among the most watched InDesign training in the world.
You can find more about David at 63p.com

Follow on LinkedIn here
  • KRISS LABER says:

    I made a character style for this. Using Advanced Character formats, I make the text 60%, baseline shift -8pt. Then add an underline with a negative offset of 7. Then I add the same number of spaces on either side of my parenthetical text (usually date or signature) and apply the style to the spaces and word(s). I always prefer to have the fewest text frames possible.

  • traci says:

    I thought this seemed like a good use for a GREP style. I set my text up with 2 em spaces before and after the parenthetical text so that the lines would be long enough, and there would be a unique pattern to find.

    I am still pretty new with GREP, but this is what I came up with:

    ~m~m\(.+?\)~m~m

    Two em spaces, followed by (, followed by any character – repeated 1 or more times with the shortest match, followed by ) and two more em spaces.

    Is there a more efficient way to express that pattern?

    This applies a character style that has the baseline of the type shifted negatives 8 points and the offset of the stroke set to negative 8 points (since negative offset on a stroke makes it go up, opposite of a baseline).

    One flaw with this method is that the line length can’t be controlled independently from the length of the parenthetical text. You may not want more space allocated for the verb than the noun…

  • Quentin says:

    @Kriss and Tracy : That is the strength of David’s way compared to yours – the length of the field can be standardized. So long as the text in parenthesis doesn’t overflow, one size box fits them all. But each field name has to be entered manually. Of course, if we could thread anchored objects, it could be made faster. David, any word on that feature?

    Your way has the advantage of being automatized since you can take a text written by someone else and format it in one step, so for VERY long texts if would definitely be quicker.

    One thing I’d add to your character style, though, is make in unbreakable, otherwise you could end up with “__(verb in” at the end of one line and “past tense)__” at the beginning of the next.

    Tracy, the only change I could make to that pattern would be so :

    ~m{2,5}\(\+?\)~m{2,5}

    Why? Because that way, you can set up a variable number of em spaces, which can be useful if you need to adjust the size of the reserved field.

    This version will apply your character text to any text surrounded by parenthesis and from 2 to 5 em spaces on each side. Is still gives you a unique pattern to search for (since I doubt you’ll use multiple em spaces elsewhere) while giving you some flexibility on your underscored field’s length. Feel free to change the second number in the curly brackets to whatever upper limit of em spaces you wanna use.

  • Anne-Marie Concepcion says:

    JEEZ the commenters at InDesignSecrets.com are smart!!!!

  • Quentin says:

    Why, thank you kind lady. :-p

    It’s all you guys’ fault, really. You awoke me to the Magic Of GREP in your blog posts. One really can do fantastic things with it.

    Last year I set up a 70-GREP-queries workflow taht we automate through the Chain_Queries script. It allows us to take 60-pages styleless Word documents written by our client’s peons and format 95% of it in one click, from Section titles to lists, web adresses and even specific word capitalization.

    Saves us HOURS of work each time, let me tell you.

  • Quentin, when you mention “the Change_Queries script,” are you referring to Peter Kahrel’s work of art here?

    https://www.kahrel.plus.com/indesign/chain_queries.html

  • Quentin says:

    Absolutely, although the version I originally designed the system around was FAR less advanced. :-) We started with this one :

    https://www.indigrep.com/index.php?post/2009/09/15/Des-requêtes-GREP-à-la-chaîne

    and I can’t believe I actually set this up in early 2010, so actually TWO years ago ! Oh how time flows when one has fun…

  • Kai Rübsamen says:

    Tracy, if you need different lengths of the underline, I like Davids method.

    If you need the same length of all lines, you are maybe more efficient, if you insert e.g. only a en-space before and after the parenthesis and then control the length of the line by a cStyle with tracking.

    So you need for the GREP-Style one character Style with the small font-size and underlining: ~>\(.+?\)~> and another character Style with tracking, e.g. 7000 for ~>. If the line should be shorter or longer, simply change the value in the cStyle.

  • >