Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

change fields order in Drupal 7 register form

Posted on 2013-12-12
4
Medium Priority
?
986 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 1600 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 400 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
A big percent of today’s marketing activity is performed through the online environment. The marketing strategies that have existed a decade ago no longer relate to what’s happening today. We’re currently facing a revolutionary era, called the digit…
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…
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…

688 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