I am trying to perform some smarty logic in the submission template of a form. Basically there are two checkboxes and I want to display a message depending on which boxes are checked. The options are:
both boxes checked
first box checked
second box checked
no boxes checked
In my submission template I have:
Code: Select all
{if ($fld_50) && ($fld_51)}
{* message *}
{elseif isset($fld_50)}
{* message *}
{elseif isset($fld_51)}
{* message *}
{else}
{* message *}
{/if}

T
Doh!
I am really dumb sometimes! No sooner had I submitted this post than I realised the answer was in the values I had given my checkboxes in the checked and unchecked states.
Simply by leaving the unchecked value blank I was able to use:
Code: Select all
{if ($fld_50 != "")}
{* and so on... *}