Solved

change fields order in Drupal 7 register form

Posted on 2013-12-12
4
937 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
[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
  • 2
4 Comments
 
LVL 2

Accepted Solution

by:
itkadmin earned 400 total points
ID: 39716729
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
ID: 39716969
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
ID: 39717596
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
ID: 39717602
oh, ok, I think I found the answer. It was suppose to be like this:

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

thanks!
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
There is a massive demand for content on the web right now, and it doesn't look like it's going to stop any time soon. But, if you are running a business blog, it's not just enough to offer your audience lots of content. It needs to be high-quality…
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 count occurrences of each item in an array.

627 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