Home / Documentation / Address Autocomplete / Multi-line Data Templates for Address Autocomplete

Multi-line Data Templates for Address Autocomplete

As of version 1.7.2, data template fields support multiple lines. This is useful when you want to populate a single textarea or HTML element with a full, multi-line address.

How to use it

In your instance’s data population settings, press Enter in the data template field to create a new line. For example:

{address1:long_name}
{locality:long_name}, {administrative_area_level_1:short_name} {postal_code:long_name}

How line breaks are rendered

Line breaks in your data template are handled differently depending on the type of form field being populated:

  • Input fields — Line breaks are converted to spaces (single-line inputs cannot display newlines)
  • Textarea fields — Line breaks are preserved as actual newlines
  • HTML elements (div, span, p) — Line breaks are rendered as <br> tags

All the same placeholder features work on each line, including fallback values and before/after attributes.