{$opts = $fielddef->GetOptions()}
{$sel_groups = explode(',', $mams_options)}
{$sel_groups = $fielddef->GetOptionValue('mams_options')}
{$groups_opts = $fielddef->GetMAMSGroups()}
{$defs = $fielddef->GetMAMSProperties()}
{$sel_def = $fielddef->GetOptionValue('mams_field')}
{$sel_def2 = $fielddef->GetOptionValue('mams_field2')}

<fieldset>
  <legend>{lang('options')}</legend>
  <div class="pageoverflow">
    <p class="pagetext">{$fielddef->ModLang('fielddef_mams_options')}:</p>
    <p class="pageinput">
        <select name="{$actionid}custom_input[mams_options][]}" size="{$groups_opts|count}" multiple>
          {html_options options=$groups_opts selected=$sel_groups}
        </select>  
    </p>
    <p class="pagetext"><div class="information">{$fielddef->ModLang('fielddef_mams_multiselect_help')}</div></p>
  </div>
  <hr> 
  <div class="pageoverflow">
    <p class="pagetext">{$fielddef->ModLang('fielddef_use_uid')}:</p>
    <p class="pageinput">
    <input type="hidden" name="{$actionid}custom_input[use_uid]" value="0" />
    <input type="checkbox" name="{$actionid}custom_input[use_uid]" value="1"{if $fielddef->GetOptionValue('use_uid')}checked="checked"{/if} />
  </p>
  <p class="pagetext"><div class="information">{$fielddef->ModLang('fielddef_use_uid_help')}</div></p>
  </div>
  <hr>
  <div class="pageoverflow">
    <p class="pagetext">{$fielddef->ModLang('fielddef_use_username')}:</p>
    <p class="pageinput">
    <input type="hidden" name="{$actionid}custom_input[use_username]" value="0" />
    <input type="checkbox" name="{$actionid}custom_input[use_username]" value="1"{if $fielddef->GetOptionValue('use_username')}checked="checked"{/if} />
  </p>
  <p class="pagetext"><div class="information">{$fielddef->ModLang('fielddef_use_username_help')}</div></p>
  </div>
  <hr> 
  <div class="pageoverflow">
    <p class="pagetext">{$fielddef->ModLang('fielddef_mams_fields')}:</p>
    <p class="pageinput">
      {html_options name="{$actionid}custom_input[mams_field]}" options=$defs selected=$sel_def}
    </p>
    <p class="pagetext"><div class="information">{$fielddef->ModLang('fielddef_mams_fields_help')}</div></p>
  </div>
  <hr> 
  <div class="pageoverflow">
    <p class="pagetext">{$fielddef->ModLang('fielddef_mams_fields2')}:</p>
    <p class="pageinput">
      {html_options name="{$actionid}custom_input[mams_field2]}" options=$defs selected=$sel_def2}
    </p>
    <p class="pagetext"><div class="information">{$fielddef->ModLang('fielddef_mams_fields_help')}</div></p>
  </div>
  <hr> 
  <div class="pageoverflow">
	  <p class="pagetext">{$fielddef->ModLang('fielddef_separator_chr')}:</p>
	  <p class="pageinput">
      <input type="text" name="{$actionid}custom_input[separator]" value="{$fielddef->GetOptionValue('separator', ' ')}" />
	  </p>
    <p class="pagetext"><div class="information">{$fielddef->ModLang('fielddef_separator_chr_help')}</div></p>
  </div>
  <hr>
  <div class="pageoverflow">
      <p class="pagetext">{$lise->ModLang('fielddef_type')}:</p>
      <p class="pageinput">
        <select name="{$actionid}custom_input[type]" style="max-width: 98%;">
          {html_options options=$opts.types selected=$fielddef->GetOptionValue('type', 'Dropdown')}
        </select>
      </p>
      <p class="pagetext"><div class="information">{$lise->ModLang('fielddef_type_help')}</div></p>
  </div> 
  
</fieldset>