Page 1 of 1

[solved] FormBuilder Submission Template Checkboxes

Posted: Tue Jul 31, 2012 11:32 am
by tdlwebs
Hi,

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}
I realise there is probably something stupid I am missing but any help would be much appreciated :-)

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... *}
:-/