1

The state of Florida, USA requires a special statement on contribution acknowledgements & receipts. I am trying to edit the online and offline workflow template so that it will include that statement if the contact.state_province is FL. Can someone please help me get the code dialed in?

Thanks in advance

{if $contact.state_province eq 'FL'}
 <p>A COPY OF THE OFFICIAL REGISTRATION AND FINANCIAL INFORMATION MAY BE OBTAINED FROM THE DIVISION OF CONSUMER SERVICES BY CALLING TOLL-FREE (800-435-7352) WITHIN THE STATE. REGISTRATION DOES NOT IMPLY ENDORSEMENT, APPROVAL, OR RECOMMENDATION BY THE STATE.</p>
{/if}

I tried it without the $ first. So... {if contact.state_province eq 'FL'}

I tried the code below but it put it on all receipts

 {assign var="florida" value="{contact.state_province eq 'FL'}{if $florida}<p>A COPY OF THE OFFICIAL REGISTRATION AND FINANCIAL INFORMATION MAY BE OBTAINED FROM THE DIVISION OF CONSUMER SERVICES BY CALLING TOLL-FREE (800-435-7352) WITHIN THE STATE OF FLORIDA. REGISTRATION DOES NOT IMPLY ENDORSEMENT, APPROVAL, OR RECOMMENDATION BY THE STATE OF FLORIDA.</p>
{/if}
3

The state token is a token and not a smarty variable, so it has to just be on its own, and you can't use it in the middle of a smarty if statement. You have to capture it first into a smarty variable:

{capture assign=stateProv}{contact.state_province}{/capture}
{if $stateProv eq 'FL'}
 <p>A COPY OF THE OFFICIAL REGISTRATION AND FINANCIAL INFORMATION MAY BE OBTAINED FROM THE DIVISION OF CONSUMER SERVICES BY CALLING TOLL-FREE (800-435-7352) WITHIN THE STATE. REGISTRATION DOES NOT IMPLY ENDORSEMENT, APPROVAL, OR RECOMMENDATION BY THE STATE.</p>
{/if}
| improve this answer | |
  • THANKS SO MUCH! – Iowa Boy Jul 11 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.