I want to add some div's and hrefs to user registration form. any ideas? I'm using ajax login/register module to get user login/register form in ajax windows. and i have no idea how to add some divs and hrefs to register form.

2 Answers 2


Assuming you're using Drupal 7.

Using hook_form_FORM_ID_alter and a custom module you can achieve it. Like below,

function mymodule_form_user_register_form_alter(&$form, &$form_state, $form_id) {
  $form['links'] = array(
    '#type' => 'item',
    '#markup' => l('some links','http://www.example.com'),           
  $form['additional_markup'] = array(
    '#type' => 'item',
    '#markup' => '<div></div>',          
  • thx. as i understand i should paste it in template.php?
    – AlexEfremo
    Jul 6, 2013 at 17:57
  • yes, it would also work in template.php file.
    – Elin Y.
    Jul 6, 2013 at 18:51

In other hand you can use Display Suite. It provide you great solution to customize things. With it you can create new registration fields the way you want it and then you can customize de display...

  • Is it possible to manage user/register page form by Display Suite? Aug 22, 2014 at 13:52
  • Yes, it's possible
    – hailton
    Aug 22, 2014 at 13:59
  • 1
    Follow the screencasts of this guy about display suite and you will master it. The link m.youtube.com/watch?v=rSgd91tZSEc
    – hailton
    Aug 22, 2014 at 20:56
  • Wow!! Thank you so much! I was looking for this ability so much time! Aug 23, 2014 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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