public
Last active

$form['field_session_room']['#type'] = 'nodereference_select';

  • Download Gist
cod_session.module
PHP
1 2 3 4 5 6 7
// 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;
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.