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?


arski’s picture

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'];
rhymeswithcamera’s picture

@arski, thanks for posting this solution. The OP question and your reply is exactly what I was looking for.

muhammad.tanweer’s picture

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