Posted By

doublejosh on 09/15/10


Tagged

drupal user registration


Versions (?)

Group all user registration fields into one fieldset


 / Published in: PHP
 

  1. function MY_MODULE_form_user_register_alter(&$form, &$form_state) {
  2. $profileFieldset= 'About You'; // CHANGE TO YOUR GROUP
  3. // cluster all fields into one fieldset
  4. foreach($form[$profileFieldset] as $key => $item) {
  5. // push field to account fieldset
  6. if( substr($key,0,8)=='profile_' ) $form['account'][$key] = $item;
  7. }
  8. unset($form[$profileFieldset]);
  9. }

Report this snippet  

You need to login to post a comment.