[solved] FormBuilder Submission Template Checkboxes

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
tdlwebs
Forum Members
Forum Members
Posts: 37
Joined: Fri Jan 11, 2008 6:56 pm

[solved] FormBuilder Submission Template Checkboxes

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

Return to “Modules/Add-Ons”