Solved

Alter drupal registration form

Posted on 2013-12-11
1
546 Views
Last Modified: 2013-12-11
Dear experts,

I am trying to alter drupal registration form. But I am quite confused how to do it.

The first thing I am trying to do is to add some intro text to the form. To do that I added the following to my template.php file:

function adaptivetheme_subtheme_theme() {
  $items = array();
  $items['user_register_form'] = array(
    'render element' => 'form',
    'path' => drupal_get_path('theme', 'adaptivetheme_subtheme') . '/templates',
    'template' => 'user-register-form',
    'preprocess functions' => array(
    'adaptivetheme_subtheme_preprocess_user_register_form'
    ),
  );
return $items;
}

function adaptivetheme_subtheme_preprocess_user_register_form(&$vars) {
  $vars['intro_text'] = t('Join us!.');
}

Then I created a user-register.form-tpl.php to render the form like this:

<p><?php print render($intro_text); ?></p>
<div class="yourtheme-user-login-form-wrapper">
  <?php print drupal_render_children($form) ?>
</div>

Now what I want to do is to change the labels to the form in order to show differently on the user profile page. for example. In the register form I ask: Tell us about yourself (text field).  On the profile page I would like that to change that label to About Me.

Could you please please please guide me to do this? I am not sure if I should create a custom module and add the corresponding hooks… not pretty sure, I´ve been just reading couple of things that are making me even more confused.

I would greatly appreciate any help,

Winter
0
Comment
Question by:glepiza
1 Comment
 

Accepted Solution

by:
glepiza earned 0 total points
ID: 39712148
Well, I found the Field Display Label module which does just what I need for the labels. Thanks!
0

Featured Post

[Webinar] Disaster Recovery and Cloud Management

Learn from Unigma and CloudBerry industry veterans which providers are best for certain use cases and how to lower cloud costs, how to grow your Managed Services practice in IaaS clouds, and how to utilize public cloud for Disaster Recovery

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article will shed light on the latest trends when it comes to your resume building needs. For far too long, the traditional CV format has monopolized the recruitment market.
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now