F2C Smarty code (snippets)

Checking a field for a value (IF CONTAINS)

compat f2c pro Recently we have added a Smarty plugin which allows for some simple syntax to check if a field contains a certain value. More advanced programmers will know that this can be accomplished using the ever dreaded regular expressions.

Smarty plugin documentation & credits

Basic syntax

The basic use of the contains syntax is the following code. Else and elseif can be used optional.

{if $FIELDNAME|contains:"value"} output {else} other output (optional) {/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.



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