Solved

Alter drupal registration form

Posted on 2013-12-11
1
543 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Encode a password 2 36
php mail headers 2 10
How to remove decimals from calculation amount 8 22
PHP Sum Column in Table 3 26
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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…

707 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

14 Experts available now in Live!

Get 1:1 Help Now