Need small help coding label mod...

So I’ve been working on a mod that prints out a shipping label with both return and ship to areas. I have it set so that it is at the bottom of the invoice on admin side and prints out on a separate sheet of paper, so whenever you print invoice, it prints out a label too. Not the best solution, but for my skills, this is as good as I can get. My question is, when there is no address2 line I get a blank line even if I add an “if” statement:



{if $order_info.s_address_2}{/if}



I’d like it to close that space if there is no address2.



So far it looks like:



FIRST LAST

ADDRESS 1



CITY STATE ZIP

COUNTRY







If anyone can help me close that gap when needed, it would be just right for half a sheet of paper or sticker. Once this is resolved, I’d be happy to post the mod. Thanks!

We need to see the rest of the code. Or at least some of the surrounding code for that {if} block.

```php



{if $field.field_name}

{assign var=“data_id” value=$field.field_name}

{assign var=“value” value=$user_data.$data_id}

{else}

{assign var=“data_id” value=$field.field_id}

{assign var=“value” value=$user_data.fields.$data_id}

{/if}


{$order_info.s_firstname} {$order_info.s_lastname}


{$order_info.s_address}

{$order_info.s_address_2}


{$order_info.s_city} {$order_info.s_state} {$order_info.s_zipcode}
{$order_info.s_country}

```

I'm sure there are better ways to code this, but this is what I have so far. This code results in a double space if there is no address2 line. Thanks!

Did you enclose the
tag also? If not, you get

which results in a blank line.