{if !empty($fields)} {foreach $fields as $v}
{$v.name}
{switch $v.type} {case 1}
{/case} {case 2}
{if !empty($v.options)} {foreach $v.options as $kk=>$vv} {$vv['value']} {/foreach} {/if}
{/case} {case 3}
{if !empty($v.options)} {foreach $v.options as $kk=>$vv} {$vv['value']} {/foreach} {/if}
{/case} {case 4} {$rs['fields'][$v['key']]|default=''} {/case} {default /}
{if $v.unit}{$v.unit}{/if}
{/switch}
{/foreach}{/if}