It’s a little difficult to explain how the addr_format option works so I will provide some examples.
But first… some background.
The addr_format option accepts only a few specific tokens.
Tokens are the % symbols and the word between, for example, %label% is a token.
The valid tokens for the addr_format option are:
%label% [NOTE: unless this is overridden, the label will be the address type.] %line1%
When processing the display of the address, Connections will scan for each token and replace it with the corresponding address segment. Each token should only be used once even though you could use each token more than once, but that is not recommended.
Here’s the default layout of the tokens that create the format of the address:
%label% %line1% %line2% %line3% %city%, %state% %zipcode% %country%
Now, your first question might be, but the address items are stacked in the traditional block layout, not on a single line, how is that being done? Right, the block layout is achieved using CSS which can easily be overridden to make the address segments display inline. How to override the CSS is a separate topic.
On to the examples.
This will display the address minus the label and country fields.
[connections addr_format='%line1% %line2% %line3% %city%, %state% %zipcode%']
This will display the address with the state and city switched, which is common in eastern Europe.
[connections addr_format='%label% %line1% %line2% %line3% %state%, %city% %zipcode% %country%']