Needs to add && $form['signup'] to the form alter if statement, i.e.

function signup_restrict_by_role_form_alter(&$form, &$form_state, $form_id) {
  if($form['#node'] && $form['#node']->type.'_node_form' == $form_id && $form['signup']) { ...

Comments

Renee S’s picture

Status: Active » Needs review

Confirmed, this fix works. Thank you! :)

scottrigby’s picture

Status: Needs review » Active

Changing status because there's no patch.

See #450634-4: Defaults per type, which also fixes this issue in a different way.

scottrigby’s picture

Status: Active » Closed (duplicate)

Actually marking as duplicate. Please test the patch in #450634: Defaults per type