Support for Content Profile User Registration
| Project: | Inline Registration |
| Version: | 6.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
| Issue tags: | user experience, user registration |
Jump to:
Hi,
I would like to use Inline Registration with the Content Profile and Content Profile User Registration profile. The later adds fields from specified content types to the user registration form and creates the corresponding profile nodes on user registration. Obviously field addition is done through hook_form_alter.
It seems that hook_form_alter implementations are not invoked when adding the user registration form into the node creation one.
I tried to add a simple call to drupal_prepare_form in inline_registration_form_alter like this
<?php
function inline_registration_form_alter(&$form, $form_state, $form_id) {
global $user;
if ($user->uid == 0 && variable_get('inline_registration_'. $form['#node']->type, 0)) {
//...
$form['register']['form'] = drupal_retrieve_form('user_register', $form_state);
drupal_prepare_form('user_register', $form['register']['form'], $form_state);
// Remove the user_register submit button in favor of the node submit button
unset($form['register']['form']['submit']);
// Rename the user field to remind the user that this is the registration form and not a login field
$form['register']['form']['name']['#title'] = t('Choose a Username');
//...
}
//...
}
?>Of course it doesn't work. The form is now completed with the fields from content_profile_registration_form_alter hook. But form submission does not behave correctly and instead returns to the page with all field empty and no error message.
I would try to dig this issue later. In the meantime, any help or advice would be appreciated.

#1
Yeah, i'm looking for exactly the same.
Did you had any luck with this?
#2
Changing the weight of the module (such that inline_registration comes after content_profile) is probably the most common, simple approach to this sort of problem.
#3
Tried this, but this doesn't work neither.
Changed the weight to -20 once, cleared caches, nothing changes.
Also tried to change weigt to 20 and cleared my caches.
@benjamin, are you sure this will work then, is it working with you somewhere?
#4
@betz - um, are you using mongolito404's code?
#5
Aahh, LOL
No, will try it now...
thanks ;)
#6
woohooo, it works!
thanks a lot
#7
Can this be commited?