{function renderName value=''} {if !empty($info.original_name)} {$value} {else} {$value|escape} {/if} {/function} {if $info.type == 'hidden'} {elseif $info.type == 'input'} {if !empty($info.description)}

{$info.description}

{/if} {elseif $info.type == 'textarea'} {if !empty($info.description)}

{$info.description}

{/if} {elseif $info.type == 'select'}
{if !empty($info.description)}

{$info.description}

{/if} {elseif $info.type == 'radio'} {foreach $info.items as $_k => $_v} {if !is_array($_v)} {$_v = ['name' => $_v]} {/if} {/foreach} {elseif $info.type == 'checkbox'} {if isset($info.items)} {foreach $info.items as $_k => $_v} {if !is_array($_v)} {$_v = ['name' => $_v]} {/if} {/foreach} {else} {/if} {if !empty($info.description)} {$info.description} {/if} {elseif $info.type == 'radio_select'}
{foreach $info.items as $_k => $_v} {if !is_array($_v)} {$_v = ['name' => $_v]} {/if} {if isset($_v.items)}
{foreach $_v.items as $_k2 => $_v2} {$_v2|escape} {/foreach}
{/if} {/foreach}
{elseif $info.type == 'radio_checkbox'}
{foreach $info.items as $_k => $_v} {if !is_array($_v)} {$_v = ['name' => $_v]} {/if} {if isset($_v['items'])} {$_disabled = !is_array($value)}
{/if} {/foreach}
{elseif $info.type == 'radio_text'} {$_counter = 0} {$_selected = false}
{foreach $info.items as $_k => $_v} {$_counter = $_counter + 1} {if !is_array($_v)} {$_v = ['name' => $_v]} {/if} {$_checked = (sprintf('%s', $_k) === $value)} {$_last = ($_counter == $info.items|count)} {if $_last} {$_checked = !$_selected} {elseif ($_checked)} {$_selected = true} {/if} {if $_last} {/if} {/foreach}
{elseif $info.type == 'help'} {if isset($info.description)} {$info.description} {/if} {/if}