Getting '#default_value' from $form I have this code: 

$form['custom'] = array(
'#title' =&gt; t('Some title'),
'#type' =&gt; 'select',
'#options' =&gt; $custom,
'#default_value' =&gt; isset($option-&gt;name) ? $option-&gt;name_id : '',
'#description' =&gt; t('Some text goes here.'),    


Now when i do print_r i get data from option and the name_id of the selected one.
No how can i get this data (name_id) from "#default_value" ?? 

In submit function i have this: 

$custom=$form_state['values']['custom'];


But this only gets me the name not the name_id .
You can get it from the form itself:

$custom = $form['custom']['#default_value'];