When enabled, if I add another node reference field that uses checkboxes instead of node_widget, the advanced views for the node reference are disabled.

Comments

john duff’s picture

The reason is in node_widget.form.inc

Line 27:

function node_widget_form_content_field_edit_form_alter(&$form, &$form_state) {
  unset($form['field']['advanced']);
}

/**
 * Implementation of #after_build callback.
 * Used to turn off validation to node widget form elements.
 *
 * @see: node_widget_widget()
 */

If you comment the unset() function, the advanced view comes back.
Just put
// unset($form['field']['advanced']);
It looks that this behaviour is here by design. I can't figure out why, as my php level only allows me to read comments and to remove a few lines.

So far I didn't see any problem in removing this line. Maybe it's safe to avoid using advanced options in the same time as this widget...
If someone sees any problem in changing this line, please advise !

Regards