{if !isset($maxtextlength)}{$maxtextlength=100}{/if}{*
*}{if isset($pre_select)}{$pre_select}{/if}{*
*}<select name="{$name}{if isset($multiple)}[]{/if}" id="{if isset($rep_name_id)}{$rep_name_id}{/if}{$name}"        
        class="{if isset($class)}{$class}{/if} {if isset($readonly) && $readonly}ignoredisabled{/if}"
        style="{if isset($deactivate_possible) && $deactivate}display:none;{/if}
        {if isset($style)}{$style}{/if}"
        {if isset($readonly) && $readonly}disabled="disabled"{/if}
        {if isset($filter_extra)}{$filter_extra}{/if}
        {if isset($multiple)}multiple="multiple" size="{$multiple}"{/if}
        {if isset($class) && stripos($class, 'required')!==false}required{/if}
    >
    {if !isset($noempty)}<option value="">&nbsp;</option>{/if}
    {if isset($emptyminus)}<option value="">&nbsp;-&nbsp;</option>{/if}
    {if isset($list)}
        {if isset($group_by_list)}
            {foreach item=group_item from=$group_by_list}
                <optgroup title="{$group_item|escape:'html'}" label="{$group_item|truncate:$maxtextlength|escape:'html'}">
                    {foreach item=item from=$list}
                        {if $item->$group_by eq $group_item}
                            <option value="{$item->$id}" {if isset($smarty.post.$name) && $smarty.post.$name eq $item->$id}selected="selected"{elseif isset($default) && $default eq $item->$id}selected="selected"{/if}
                                title="{$item->$text|escape:'html'}" {if isset($mapclass) && isset($item->$mapclass)}class="{$item->$mapclass}"{/if} >{$item->$text|truncate:$maxtextlength|escape:'html'}&nbsp;</option>
                        {/if}
                    {/foreach}
                </optgroup>
            {/foreach}
        {else}
            {foreach item=item from=$list}
                <option value="{$item->$id}" {if isset($smarty.post.$name) && $smarty.post.$name eq $item->$id}selected="selected"{elseif isset($default) && $default eq $item->$id}selected="selected"{/if}
                    title="{$item->$text|escape:'html'}" {if isset($mapclass) && isset($item->$mapclass)}class="{$item->$mapclass}"{/if} >{$item->$text|truncate:$maxtextlength|escape:'html'}&nbsp;</option>
            {/foreach}
        {/if}
    {/if}
</select>{*
*}{if isset($past_select)}{$past_select}{/if}{*
*}{include file="r/parts/past_field.tpl"}