Solved

change fields order in Drupal 7 register form

Posted on 2013-12-12
4
852 Views
Last Modified: 2013-12-13
Hi,

On my drupal register form, I allowed users to set their own time zone. For some reason, that locale settings is appearing right in the middle of my form. Do you know a Drupal way to move it to the bottom of the form? I went to admin/config/people/accounts/fields but I can´t see that field being added there. So where is it? how can I change its position?

I would greatly appreciate any help on this,


Winter
0
Comment
Question by:glepiza
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
itkadmin earned 400 total points
Comment Utility
You could modify the user registration form template. https://drupal.org/node/1211520
0
 
LVL 17

Assisted Solution

by:nanharbison
nanharbison earned 100 total points
Comment Utility
Did you try going directly to the form page and clicking on WEBFORM? It lets you move the elements around by the cross to the left of each element.
Or is this a specific content type you have created? In this case you go to Structure->content types and manage the display there.
0
 

Author Comment

by:glepiza
Comment Utility
Hello experts, Thank you for your answers,

I ended up using the link itkadmin provided and it was quite helpful. I am printing all my fields using user-register-form.tpl.php like this:

<?php print render($form['form_id']); ?>
<?php print render($form['form_build_id']); ?>
<?php
 print render ($form['name_first']);
 print render ($form['name_last']);
 print render ($form['city']);
 print render ($form['country']); //This is the Country
 print render ($form['sex']);
 print render ($form['date_of_birth']);
 print render ($form['phone_number']);
 print render ($form['mail']);

the problem I found is that mail is not being printed out. No idea why. I did not created mail for the user registration form, it was actually placed there by the system. But when I do print_r($form) I can see the mail array like this:

[mail] => Array ( [#type] => textfield [#title] => E-mail [#maxlength] => 254 [#description] => A valid e-mail address. All e-mails from the system will be sent to this address. The e-mail address is not made public and will only be used if you wish to receive a new password or wish to receive certain news or notifications by e-mail. [#required] => 1 [#default_value] => [#attributes] => Array ( [placeholder] => xxx@xxx.com )

so I am a little confused.. why it is not outputting the input email field?

Any insight would be greatly appreciated.

Thanks

Winter
0
 

Author Comment

by:glepiza
Comment Utility
oh, ok, I think I found the answer. It was suppose to be like this:

print render($form['account']['mail']);

thanks!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

762 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

9 Experts available now in Live!

Get 1:1 Help Now