HIDE custom profile fields

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Suggested Hosts
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
Browner87
Registered User
Posts: 15
Joined: Tue Sep 23, 2008 2:16 am

HIDE custom profile fields

Post by Browner87 »

I'm hosting a forum for students at my college to use and post in, but to be sure that they are really students from my class, I require them to enter their student number on the registration page, which I can cross-reference to a list later. My problem is that the Student Number field shows up in their profile and can be changed. I don't want it to be changeable by the user or even viewable by any other user. Is there a way to have this field show on the registration page, but then be invisible to everyone except in the ACP?

Thanks :)
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52018
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: HIDE custom profile fields

Post by Brf »

If you set "display" to "no" on the Custom profile Field properties, then it will not be visible to other users...
It would be harder to remove it from a user's UCP and still require it on registration.
Browner87
Registered User
Posts: 15
Joined: Tue Sep 23, 2008 2:16 am

Re: HIDE custom profile fields

Post by Browner87 »

well I already set the hidden to true, but I thought it would also hide it from the user. Does 'Hide' not make sense that it means hidden? Anyways - I'm not afraid of custom coding either - I generally know what I'm doing with programming although my MySQL is very limited...

Anyone know how to die it OR at least make it not-changeable by the user?
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52018
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: HIDE custom profile fields

Post by Brf »

No. Dont set it to "Hide". Set it to "Required"

The "Display profile field" is a separate selector further up the page. Setting it to "No" will hide it from other users.
Browner87
Registered User
Posts: 15
Joined: Tue Sep 23, 2008 2:16 am

Re: HIDE custom profile fields

Post by Browner87 »

Actually - my bad. It's not set to either. It's set to "Display at registration screen:
If this option is enabled, the field will be displayed on registration and able to be changed within the user control panel.". It is also set to no beside "Display profile field:
The profile field will be shown in all places allowed within the load settings. Setting this to “no” will hide the field from topic pages, profiles and the memberlist." and yet it still shows in users' profile page. I can't make it mandetory/required because teachers don't have a student ID.

Is there a way to hide it in the users OWN profile in UCP?
mtrs
Registered User
Posts: 2049
Joined: Sat Sep 22, 2007 2:39 pm

Re: HIDE custom profile fields

Post by mtrs »

I abandoned all of my mods.
Browner87
Registered User
Posts: 15
Joined: Tue Sep 23, 2008 2:16 am

Re: HIDE custom profile fields

Post by Browner87 »

THANK YOU! It was really imperative that I got this resolved quickly and you guys came through again! I used the code

Code: Select all

<!-- IF  (profile_fields.FIELD_ID != "pf_student_number" ) -->
around the entire show field routine and it disappeared! Thank you so much AGAIN mtrs!

I think this is all I need help with for now unless you have a spare tutorial on hacking our college database, extracting student numbers from my class, then cross-checking and only allowing one account per student :lol:



Thanks again!
Locked

Return to “[3.0.x] Support Forum”