2

I am working on a website based on Drupal Commons. It uses Commons Profile Module to add extra fields to add user information.

I want to accomplish two tasks:

  1. Change the layout of User Profile edit page i.e. : mysite/user/%user/edit. Where do I make the changes. Should I create a new *.tpl.php file and if so, then where?

  2. I want to fetch the User Information Fields added by the Commons Profile Module to the edit form.

Please provide a solution in which both these issues are taken care of.

  • Did the below answer worked for you? – Umair May 10 '17 at 16:42
5

I had to do this in the past and I went the module route.

Using Display Suite, Renderable Elements and Field Group I was able to fully change the layout of edit forms.

Display Suite allows you to take full control over how your content is displayed using a drag and drop interface. Arrange your nodes, views, comments, user data etc. the way you want without having to work your way through dozens of template files. Screencast

Renderable Elements enables you to register any forms and manage the display through an UI. It will also make (additional) elements available of existing entities on the manage forms/display screens or you can for example register the contact form and rearrange the fields through Field UI. Screencast

Field Group will, as the name implies, group fields together. All fieldable entities will have the possibility to add groups to wrap their fields together. Fieldgroup comes with default HTML wrappers like vertical tabs, horizontal tabs, accordions, fieldsets or div wrappers.

Edit: Also using Display Suite, you can add different views or blocks directly as fields to your node. So pulling fields from other entities shouldn't be a problem if you are good with views.

  • Why not use panels instead of ds? I want to split edit profile page into vertical tabs with specific fields. For example Email Notification tab will have all fields or settings related to Emails. Similarly other tabs will have different user fields. Any idea how to achieve it? – Umair May 5 '17 at 13:46
  • Did you get the username, password and email field forms? – Umair May 10 '17 at 16:44
  • 1
    Back in 2013 I used DS, but I have also since switched to Panels. I use a combination of Chaos Tools and Panels. After enabling the Page Manager module (Chaos Tools) and Panels modules, you should be able to enable the User edit template in order to override the User Edit form Also the following modules might be interesting for those that want to override everything with Panels pages: Page Manager Existing Pages, Panelizer, and Panels Everywhere – NWOM May 11 '17 at 10:09
  • Does Panels Everywhere work without issues? – Umair May 11 '17 at 11:01
  • 1
    So far it works great. I use Panels Everywhere with the Radix theme (with a bootswatch subtheme). There are only a few modules where I have seen incompatibilities with Panels Everywhere. All have been patched aside from Authcache which can't lazy load panels when using Panels Everywhere. – NWOM May 11 '17 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.