drupal field list data I have created a custom field list, but of all documentation I have read, I can't find a clear example on how to add data on the list.

The code so far is this:

/**
 * Adds field.
 */
function _my_installed_fields() {
  $t = get_t();
  return array(
    'my_dropdown_list' =&gt; array(
      'field_name' =&gt; 'my_dropdown_list',
      'label' =&gt; $t('Select an item'),
      'type' =&gt; 'list_text'
    )
  );
}
/**
 * Adds instances.
 */
function _my_installed_instances() {
  $t = get_t();
  return array(
    'my_dropdown_list' =&gt; array(
      'field_name' =&gt; 'my_dropdown_list',
      'type' =&gt; 'list_text',
      'label' =&gt; $t('Select an item'),
      'widget' =&gt; array(
        'type' =&gt; 'options_select'
      ),
      'display' =&gt; array(
        'example_node_list' =&gt; array(
          'label' =&gt; $t('Select n item'),
          'type' =&gt; 'list_text'
        )
      )
    )
  );
}


I need to let only one value to be selected and saved.
Try to add cardinality and settings parameters:

  function _my_installed_fields() {
    $t = get_t();
    return array(
      'my_dropdown_list' =&gt; array(
        'field_name' =&gt; 'my_dropdown_list',
        'label' =&gt; $t('Select an item'),
        'type' =&gt; 'list_text',
        'cardinality' =&gt; 1,
        'settings' =&gt; array(
          'allowed_values' =&gt; array(
            1 =&gt; 'One',
            2 =&gt; 'Two',
            3 =&gt; 'Three',
          ),
        ),
      )
    );
  }