{foreach from=$fields item=field} {assign var=fieldId value=$field->getId()} {if $field->getType() == 1 && ($type == 1 || $type == "")}