{foreach from=$smarty_form_items item=item} {if $item->getType() == 'group'} {include file='templates/elements/form/field-group.html' item=$item->toArray()} {else} {assign var='template' value=$item->getTemplate()} {include file=$template field=$item->toArray()} {/if} {/foreach}