Smarty conditional statement in Formbuilder

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
climberusa
Forum Members
Forum Members
Posts: 126
Joined: Sun Feb 26, 2006 7:10 pm

Smarty conditional statement in Formbuilder

Post by climberusa »

I'm trying to isolate a specific input field based on its name like this:

Code: Select all

{if $field->name = 'Test'}Text Here{/if}
and it is pulling the correct form field but it's also displaying :
"string(134) "Smarty error: [in module_db_tpl:FormBuilder;fb_2 line 52]: syntax error: unidentified token '=' (Smarty_Compiler.class.php, line 1396)"
so I tried using two '=' signs and it removes the error but then it doesn't pull the form field.

Any ideas??
cyberman

Re: Smarty conditional statement in Formbuilder

Post by cyberman »

Have you tried this?

Code: Select all

{if $field->name eq 'Test'}Text Here{/if}
Post Reply

Return to “CMSMS Core”