0

I have customized user profile edit page as page-user-edit.tpl.php in drupal 6 and created custom fields in user profiles like COMPANY SIZE with radio buttons, NO OF EMPLOYEES etc.

It is configured to display these field during registration based on role. It works well. My problem is these fields are not being displayed on user edit page (user/*/edit). Is there any way i can display the fields on user edit page to update values.

Here is my code on page-user-edit.tpl.php

<div id="container">
<div id="wrapper">
<div id="page_tp">

<?php if(arg(0) == 'user' && arg(3) == 'profile' && arg(1) != '0' && trim($user->roles[3]) == 'Corporate Profile'  ){ ?>

<?php print $help; ?> <?php print_r($content); ?>

<?php } ?>

</div>
</div>
</div>
  • Looks like a problem with conditionals. Can you tell us how did you make them conditional based on role? – Mołot Sep 20 '13 at 9:35
  • <?php if(arg(0) == 'user' && arg(3) == 'profile' && arg(1) != '0' && trim($user->roles[3]) == 'Corporate Profile' ){ ?><?php print_r($content); ?><?php } ?> Here is my code to print the content based on role. but the fields from content profile fields are shown in user edit profile page. – Dhinesh.ES Sep 20 '13 at 9:41
  • Please edit this into a question itself. Also, please include not only the line itself, but meaningful portion of code, ie whole hook implementation or significant part of tpl file (with filename information included, as in case of tpl it matters). – Mołot Sep 20 '13 at 9:44
  • @Molot i have edited and included the code in question itself and ignore if its clear for you this is the code i have implemented in page-user-edit.tpl.php – Dhinesh.ES Sep 20 '13 at 9:54
  • How you have created custom fields for user registration? – Jayendra Kainthola Sep 20 '13 at 10:29
0

I think the custom fields comes under a new tab. The tab name would be the value you given in the category field . please check

  • You may correct @nabil i did checked that too . I have created my fields under category "COMPANY" but there is no name like "COMPANY" in tabs.? – Dhinesh.ES Sep 20 '13 at 12:48

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.