1

I would like to over ride the default registration form of Drupal. I want to edit its mark-up. Add few classes and wrap them with few div tags. I don't know how to get this done ? Is it possible to over ride like what we do for html.tpl.php ? I mean copy pasting a particular file some where from system into the template folder and edit it ? Please help me. I am very much new in Drupal.

1

You can use hook_form_alter to alter the registration form. This allows you to add markup, change labels, add divs, ...

Also to add markup, you could have a look at markup field

ANd last but not least, check out this page: https://www.drupal.org/node/350634. It contains a lot of info on how to override the user login/registration page

function mymodule_form_alter(&$form, &$form_state, $form_id) {
  if ($form_id === 'user_register_form') {
    // perform other changes here
  }
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.