Skip to content

Instantly share code, notes, and snippets.

@rmontero
Created July 30, 2012 21:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmontero/3210659 to your computer and use it in GitHub Desktop.
Save rmontero/3210659 to your computer and use it in GitHub Desktop.
$form['field_session_room']['#type'] = 'nodereference_select';
// cod_session.module @ 161
// If this is content-type is not unique make the widget a select list.
if (variable_get('cod_unique_' . $form['#node']->type, COD_SCHEDULE_SINGLE) == COD_SCHEDULE_MULTIPLE) {
$form['field_session_room']['#type'] = 'nodereference_select';
// Keep the widget from allowing multiple values.
$form['#field_info']['field_session_room']['multiple'] = FALSE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment