Solved

Alter drupal registration form

Posted on 2013-12-11
1
561 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this blog, I will share you some basic tips for content marketing and to rank your website on Google.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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…

763 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