Anyway to control the view profile fields?

  • andybon
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 9 months ago #100101 by andybon
I'm looking at the front end 'User Profile' page where a user can edit their submitted info.

Is there any way to control what fields display here, and which can be edited?

The reason I ask, on my sign up form I use many custom fields that are relevant there, but not after sign-up... for example, some guidance text, and a 'I accept terms and conditions' check-box, and 'why are you applying'

These kind of things I don't want the user to see when he edits his profile data.

If this is not possible, is there a way that I could make the entire display just 'read only' perhaps through a code tweak. That way I could add a message at the top to say "This is what you submitted. If you want to make any changes, contact...."

(Thinking ahead, maybe the Menu Item could have that as a parameter... "Read Only Data? Yes / No")

Thanks!

Please Log in or Create an account to join the conversation.

More
6 years 9 months ago #100113 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Anyway to control the view profile fields?
Hello

Unfortunately, there is no setting like that. If you want to have data display only, you will need to customize the code yourself

The file you need to modify is components/com_osmembership/view/profile/tmpl/default_profile.php

Change the code from:
Code:
foreach ($fields as $field) { if ($field->fee_field) { echo $field->getOutput(true, $bootstrapHelper); } else { echo $field->getControlGroup($bootstrapHelper); } }

To
Code:
foreach ($fields as $field) { echo $field->getOutput(true, $bootstrapHelper); }

should work. However, you need to remove the Update button, too, so that users cannot click on to update profile data

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • andybon
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 9 months ago #100146 by andybon
Replied by andybon on topic Anyway to control the view profile fields?
Thanks Tuan. This does work very well.

I would like to make 2 points related to this.. a WISH LIST and a BUG REPORT

1) WISH LIST: Maybe you could consider having an option on custom field creation which is "Allow edit on profile view? YES / NO" - This is important because some of the custom fields I ask my members when they first subscribe I don't want them to be able to edit ever again! Ideally there would be a "Allow display on profile view?" as well - some of my fields are guidance notes and they don't need to be repeated.

2) BUG: During my work on this, I did find an issue... As you know, Membership Pro allows a custom field to assign a member to a Joomla Group... problem is this same field shows on EDIT PROFILE and also on RENEW screens - if the user changes it, no change is made to the User Group... we would expect them to be removed from the group they were in, and added to whatever they changed the value to... does that make sense?

Please Log in or Create an account to join the conversation.

More
6 years 9 months ago #100159 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Anyway to control the view profile fields?
Hello

1=> Could you something for Membership Pro version 3.0.0

2=> That's unfortunately, not easy task due to the way custom field Joomla group works. We can only add users to Joomla groups based on the option they select on the subscription process (after subscription become active), we could not change the group base on the value they change

Maybe in user profile, we should not allow changing value of this custom field

Agree that it is a bug but something almost could not be fixed (at least for now). Will have to think more about this case

Tuan

Please Log in or Create an account to join the conversation.

  • andybon
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 9 months ago #100160 by andybon
Replied by andybon on topic Anyway to control the view profile fields?
OK thanks Tuan. Yes so it would be both on 'User Profile' and the 'Subscription Renewal' screens where a LIST FIELD with Joomla Group association parameters should be unchangeable to protect against this bug until such a time it can be fixed.

If the "Make Field Editable?" option on custom fields was possible for Membership Pro v3 then this would allow us to guard against the issue.

Thanks!

Please Log in or Create an account to join the conversation.

More
6 years 8 months ago #101456 by Chris Jarvis
Replied by Chris Jarvis on topic Anyway to control the view profile fields?
Hi Tuan and Andy

Could I please add my vote to the points Andy makes about the user profile/custom fields having the ability to choose whether they are viewable on the profile and then if they can be edited by the member please?

This is exactly what we need too.

Membership Pro is so good. Especially with its custom fields that it has become more than a membership expiry/renewal function for us. The User Profile and Custom fields you have created allows us to store a very accurate picture of our members and we record data on there that is very useful to both us and the member.

We are able to store qualifications they have achieved with us and their grades, we can let certain members see only their grade level resources based on these achievements and it works so fantastic but some of this data needs to be seen by members to check and inspire them to attend more of our Events (use Event Booking I might add) to gain further qualifications BUT NOT AMENDED.

A lot of our members ask us for proof of their level and their qualification grade and it would be great if they could see this in their profile like they can their address and membership periods but obviously they cannot edit these as they could give themselves higher levels or extend their own expiry dates.

It would be brilliant if all the data we store on them could be made available to their login profile. It would save so many phone calls and requests and would make our website an even better resource for them than you have made it already.

I agree with Andy that additions of Yes/No boxes to make the custom field appear in the profile and then another to make it editable to the member or not would be perfection.

Thanks again for such a great set of products and great support

Chris

Please Log in or Create an account to join the conversation.

More
6 years 8 months ago #101520 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Anyway to control the view profile fields?
I have the code implemented. In the next release 2.10.0, you can set Can Edit On profile of a custom field to No (It is Yes by default) and data for that field will only be viewable on subscriber profile, not editable

Regards,

Tuan
The following user(s) said Thank You: andybon, Alan Henness

Please Log in or Create an account to join the conversation.

  • andybon
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 7 months ago #101571 by andybon
Replied by andybon on topic Anyway to control the view profile fields?
That's great news. Thanks Tuan!

Please Log in or Create an account to join the conversation.

More
6 years 7 months ago #101572 by Chris Jarvis
Replied by Chris Jarvis on topic Anyway to control the view profile fields?
Thank You Tuan
I've said it before and I will say it again i am sure
JoomDonation customer service rocks!!!
Thanks for looking at this and I am excited about the upcoming release
Chris

Please Log in or Create an account to join the conversation.

More
6 years 7 months ago #101614 by Chris Jarvis
Replied by Chris Jarvis on topic Anyway to control the view profile fields?
Hello again Tuan
Could I please check one more thing after thinking a bit further on your reply above?

In the next release, will all custom fields appear in the user profile and the member can only edit those that are set to edit in profile Yes?
Or will we be able to show only chosen custom fields to appear AND also decide if they can be edited by the member?
We have some custom fields that we don't want to show our members still and others that we want to show but not have changed by a member.
Before I update I wanted to be sure it won't show all of custom fields
Sorry for extra question

Chris

Please Log in or Create an account to join the conversation.