When other modules implement hook_form_alter() or hook_form_FORM_ID_alter() to alter the user_register form, it won't work. That's because there isn't any handling in the code for this.

Comments

balintbrews’s picture

StatusFileSize
new1.25 KB

Here is a patch which seems to work.

balintbrews’s picture

Title: hook_form_alter() and hook_form_FORM_ID_alter() don't effect to inline registration form » hook_form_alter() and hook_form_FORM_ID_alter() have no effect on inline registration form

(A better issue title.)

gumol’s picture

Status: Needs review » Needs work

This code removes all my profile fields from inline registration.

super_romeo’s picture

For D7:

    $reg_form_id='user_register_form';
    $reg_form_state=array();
    $reg_form_state['build_info']['args'] = array();

    $reg_form = drupal_retrieve_form($reg_form_id, $reg_form_state);

    $hooks = array('form', 'form_'.$reg_form_id);
    drupal_alter($hooks, $reg_form, $reg_form_state, $reg_form_id);
    $form['register']['form']=$reg_form;
super_romeo’s picture

For D7:

    $reg_form_id='user_register_form';
    $reg_form_state=array();
    $reg_form_state['build_info']['args'] = array();

    $reg_form = drupal_retrieve_form($reg_form_id, $reg_form_state);

    $hooks = array('form', 'form_'.$reg_form_id);
    drupal_alter($hooks, $reg_form, $reg_form_state, $reg_form_id);
    $form['register']['form']=$reg_form;
nijolawrence’s picture

Issue summary: View changes
StatusFileSize
new1.06 KB

D7 patch

nijolawrence’s picture

Status: Needs work » Needs review

elaman’s picture

Status: Needs review » Closed (outdated)

Issue is very old. Closing it.