Form altered select field is submitting the wrong values I created a content type in a module called travel_page.

In Drupal, I added a new empty List(text) field called English_side_menu

Now I want to populate the List text dynamically.

I did:

/**
 * Implements hook_form_alter().
 */
function travel_page_form_alter(&amp;$form, $form_state, $form_id) {

  // $english_side_menu_list has been initialed here 

  $form['field_english_side_menu']['und']['#options'] = $english_side_menu_list;
  dpm( $form['field_english_side_menu']);   

}


Every thing is working fine, except the value that appears for the select once I submit the button, is the rank of the selection instead of the text selected.

Do you have an idea what is wrong in the code?

Thanks.
For dynamic list text no need of form alter for a content type.

You can achieve this goal using Content Construction Kit (CCK) module.

Install this module and configure field as below image

and define function statement like 

function _options_english_side_menu(){
    $english_side_menu_list = array('1' =&gt; 'value1', '2' =&gt; 'value2');
    return $english_side_menu_list;
}


Using this function you can assign dynamic list to list text.