title: sugarCRM how to populate a dropdown
body: <p>I'm using SugarCRM v6.5, I'm terribly newbie.
  In the Leads, I wanted to add a field in the address type to indicate the type of address (ie office, home, ...). So in the studio I created this field "type_address" as an simple dropdown (don't know the term in english, in french it's "liste à choix simple") and I indicated the options to use to populate it. So far, it's ok, if I display it on a form, it populates correctly. But I 'd like to add it in the address field, so I opened include\SugarFields\Fields\Address\fr_FR.EditView.tpl and added a line like this : </p>
  
  <pre><code>&lt;tr style="background-color: yellowgreen;"&gt;
  &lt;td valign="top" width='25%' scope='row' &gt;&lt;label for="{{$typeaddr}}"&gt;{sugar_translate label='LBL_{{$key}}_ADRESS_TYPE' module='{{$module}}'}:&lt;/label&gt;
  {if $fields.{{$typeaddr}}.required || {{if $typeaddr|lower|in_array:$displayParams.required}}true{{else}}false{{/if}}}
  &lt;span class="required"&gt;{$APP.LBL_REQUIRED_SYMBOL}&lt;/span&gt;
  {/if}
  &lt;/td&gt;
  &lt;td&gt;
  &lt;select name="{{$typeaddr}}" id="{{$typeaddr}}" title=''  &gt;
     {html_options options=$fields.{{$typeaddr}}.options }
  &lt;/select&gt;
  &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>and in the top of template I put :</p>
  
  <pre><code>{{assign var="typeaddr" value=$displayParams.key|cat:'_adress_type_c'}}
  </code></pre>
  
  <p>The line displays, the label is ok, but the dropdown does not populate.
  I tried to indicate the options list in 
  \custom\Extension\modules\Leads\Ext\Vardefs\sugarfields_primary_adress_type_c.php
  like this : </p>
  
  <pre><code>$dictionary['Lead']['fields']['primary_adress_type_c']['type'] = 'base';
  $dictionary['Lead']['fields']['primary_adress_type_c']['options'] = 'list_name_as_created_in_studio';
  </code></pre>
  
  <p>I also tried to put it in \custom\modules\Leads\metadata\editviewdefs.php</p>
  
  <pre><code>0 =&gt; 
        array (
          'name' =&gt; 'primary_adress_type_c',
          'studio' =&gt; 'visible',
          'label' =&gt; 'LBL_PRIMARY_ADRESS_TYPE',
          'type' =&gt; 'base',
          'options' =&gt; list_name_as_created_in_studio',
        ),
  </code></pre>
  
  <p>I tried with both enum and base. The trick is, even if I put 'enum' and an array of options, it does not populate.</p>
  
  <p>I don't see where I could interfere to make it work, I surely forgot to do something.</p>
  
  <p>Any help is welcome, even a link to the manual (I read it and didn't find anything to help, but I could miss something)</p>