Skip to content

Instantly share code, notes, and snippets.

@rafinskipg
Created November 1, 2012 16:10
Show Gist options
  • Save rafinskipg/3994659 to your computer and use it in GitHub Desktop.
Save rafinskipg/3994659 to your computer and use it in GitHub Desktop.
Node types selection for migration modules forms
$types = node_type_get_types();
$option_types = array();
foreach($types as $type){
$option_types[$type->type] = $type->name;
}
$form['migration_type'] = array(
'#type' => 'select',
'#options' => $option_types,
'#title' => t('Select the contet type to be created?'),
'#default_value' => variable_get('migration_type', ''),
'#required' => TRUE,
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment