Posted by RodrigoBalest on April 18, 2010 at 7:57pm
4 followers
Jump to:
| Project: | Content Profile |
| Version: | 6.x-1.0 |
| Component: | User registration module |
| Category: | support request |
| Priority: | normal |
| Assigned: | RodrigoBalest |
| Status: | active |
Issue Summary
Hi!
I installed Content Profile and Content Profile User Regstration. I set CP fields to be filled at user registration page. The fields I created are all inside fieldsets, according to their categories. So I'd like to put the Drupal default registrations fields inside a fieldset.
I'd like to achieve something like the registration form on this site: http://www.tdotdating.com/user/register
Does anybody knows how to do this? Should I create a mini module and use hook_form_alter or something?
Thanks!!
Comments
#1
If you're still interested, you can use hook_form_alter indeed:
if ($form_id == 'user_register') {$form['account_settings'] = array(
'#type' => 'fieldset',
'#title' => 'Account settings',
'#collapsible' => FALSE,
'#collapsed' => FALSE,
);
$form['account_settings']['name'] = $form['name'];
$form['account_settings']['mail'] = $form['mail'];
unset($form['name']);
unset($form['mail']);
}
#2
@arski, thanks for posting this solution. The OP question and your reply is exactly what I was looking for.
#3
I needed this on Profile edit page in drupal 7. In the form, the "account" is of type "container". I changed its type to fieldset and all was good. Same should work for user register form as well. Just in case someone is trying it in D7