F2C Smarty code (snippets)

Hiding empty fields (IF ELSE)

The Smarty template engine has made life very easy for us. Using the IF statement we can check IF a field has a value.

In this case IF actually means "if the field has a value than show .... whatever is between the IF tags."

The basic Smarty syntax is:

{if $FIELDNAME}
 ..... any text/html/plugin code including the actual field data {$FIELDNAME} ....
{/if}

Including ELSE

{if $FIELDNAME}
  ..... any text/html/plugin code including the actual field data {$FIELDNAME} ....
 {else}
..... Notice: You did not fill out the field called XXXXXX
{/if}

F2C Cheat-sheet

An overview of all template parameters (placeholders for your form data). These are used in your F2C intro and main template to parse the data from your submission forms into the Joomla article.

Download

Footer

Form2Content, a Joomla CCK Documentation © 2010 - 2015 Open Source Design | Powered by Form2Content