Multiple fields in one text frame

04/06/2007

You may need to group a few lines of text for vertical/horizontal alignment and shift.
E.g. if no phone number is provided by the user, the ph prefix won’t
show and the lines below it will shift up.

Watch a Flash demonstration on this topic

In this example, fields are bound by {curly brackets} and groups are bound by [square brackets].

The sample text frame (above) contains multiple fields bound by {curly brackets}

You need to enter all the frame’s field names in one line in the Object Manager, separated by
semicolons in the order they appear. i.e. Name; Phone number; Fax number.

{curlybrackets} indicate that the content between them is a field and needs to be replaced with user input.[square brackets].group fields with {curly brackets} and static content to remove the static
content if no input is provided for the fields inside it, e.g.

[ph [{area} ]{phone number} tells the system to:

  1. Replace area with user provided area code or remove the hyphen if the user provided none
  2. Replace phone number with user provided phone number
  3. Remove the entire paragraph if neither area code nor phone number was provided

An opening [square bracket at the beginning of a paragraph without a matching closing square bracket] indicates that the entire paragraph should be removed if there is no user input in it. This allows you to remove the entire line and shift the other lines up or down, depending on the vertical alignment.

How multiple fields in one text frame are processed

  1. The brackets are removed when the template is uploaded, so the users won’t see them
  2. The formatting of the brackets doesn’t matter (i.e. italic, bold, colour, etc)
  3. If there is only an opening square bracket, then the rest of the paragraph is removed, including the paragraph mark if no user input was provided
  4. If there is an opening and closing square bracket, then only the content between the brackets is affected

Field grouping using [square brackets] can be nested, as in this example: [ph. [0{#}]{phone number} (a/h)]

See also: