Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Edit profile information field groups

9 years 1 month ago
  • Alan's Avatar
    Topic Author
  • Alan
  • Offline
  • Fresh Boarder
  • Posts: 83
  • Thank you received: 14
Licenses:
JomSocial Expired Socialize Expired

Hi

I'm not sure if this is out of the support scope, but I am wondering if I could have some assistance on hiding a field group from the edit profile information page? I don't want users to be able to edit some information after registering, such as gender and date of birth

I think a small snippet of php should do the trick but unsure

9 years 1 month ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Alan,

you should hack/override this file components/com_community/templates/jomsocial/layout/profile/edit.php, you need to know the field ID do you want to hide, and the put this code inline 60:

if($f->id=='FIELD_ID_1' || $f->id=='FIELD_ID_2' ) continue;

Im not sure it will work, since not tested yet.

thank you

9 years 1 month ago
  • Alan's Avatar
    Topic Author
  • Alan
  • Offline
  • Fresh Boarder
  • Posts: 83
  • Thank you received: 14
Licenses:
JomSocial Expired Socialize Expired

Hi Dimas

This doesn't work for me, I retrieved my field IDs from the database, 3 & 16 to hide Date of Birth & Gender

9 years 1 month ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

would you mind provide me the FTP access, I can help you a bit.

9 years 1 month ago
  • Alan's Avatar
    Topic Author
  • Alan
  • Offline
  • Fresh Boarder
  • Posts: 83
  • Thank you received: 14
Licenses:
JomSocial Expired Socialize Expired

Hi Dimas

I have updated the original post with the details for my test site

Thank you for your assistance

9 years 1 month ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Alan,

I just fix this, please you check components/com_community/templates/jomsocial/layout/profile/edit.php, and find :

// hack code 
                        if ($f->id == 3 || $f->id == 16) {
                            continue;
                        }

thank you

9 years 1 month ago
  • Alan's Avatar
    Topic Author
  • Alan
  • Offline
  • Fresh Boarder
  • Posts: 83
  • Thank you received: 14
Licenses:
JomSocial Expired Socialize Expired

Hi Dimas

While that hides the field just as I wanted, it no longer lets me save profile updates, it advises that the field date of birth contains improper values

9 years 1 month ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Please check again.. I just fix it.. but I suggest you set those 2 fields to optional not set as required

9 years 1 month ago
  • Alan's Avatar
    Topic Author
  • Alan
  • Offline
  • Fresh Boarder
  • Posts: 83
  • Thank you received: 14
Licenses:
JomSocial Expired Socialize Expired

Thanks Dimas, really appreciated.

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW