Codoforum related discussions
[NEED HELP] Disabling editing for custom profile fields, but keeping them on the profile

Hello,


I want to have a custom profile field on my users profiles, however there is no option to have it appear on the profile but not being able to edit it in user settings


It's either, have both (display and editable) or how neither.


Is there anyway I can just have a custom profile feature be displayed on the profile, but not be changeable in settings


Thanks


Hello, I want to have a custom profile field on my users profiles, however there is no option to have it appear on the profile but not being able to edit it in user settings It's either, have both (display and editable) or how neither. Is there anyway I can just have a custom profile feature be displayed on the profile, but not be changeable in settings Thanks

You can use the custom field feature at Codoforums admin backen.
There is the following setting option ....


Show in profile and profile edit page ?


If you set it to "no" then the field should be visible at the profile pages, but there is no way for the user to edit it. I think thats what you want or not?


Kind regards, Andy smile


You can use the custom field feature at Codoforums admin backen. There is the following setting option .... _Show in profile and profile edit page ?_ If you set it to "no" then the field should be visible at the profile pages, but there is no way for the user to edit it. I think thats what you want or not? Kind regards, Andy ;)

You can use the custom field feature at Codoforums admin backen.
There is the following setting option ....


Show in profile and profile edit page ?


If you set it to "no" then the field should be visible at the profile pages, but there is no way for the user to edit it. I think thats what you want or not?


Kind regards, Andy


Hi webcrew,


I have tried this and it disables it for both unfortunately
I tried looking at the files (the ones on my FTP client) and couldn't find anything either.


Thanks for the suggestion though


[quote="pid:24818, uid:8261"]You can use the custom field feature at Codoforums admin backen. There is the following setting option .... Show in profile and profile edit page ? If you set it to "no" then the field should be visible at the profile pages, but there is no way for the user to edit it. I think thats what you want or not? Kind regards, Andy[/quote] Hi webcrew, I have tried this and it disables it for both unfortunately I tried looking at the files (the ones on my FTP client) and couldn't find anything either. Thanks for the suggestion though

Hi,


If you want all the fields to only appear in profile view and not appear in profile edit, you can do this simple change to achieve that:


Open sys/CODOF/User/CustomField.php


Around line 88, replace


return $allowed_fields;

with


return [];//$allowed_fields;

However, note that this will apply to all fields, if you want only few fields to behave like this it will require much more changes.
Let me know if this works for you


Hi, If you want all the fields to only appear in profile view and not appear in profile edit, you can do this simple change to achieve that: Open sys/CODOF/User/CustomField.php Around line 88, replace ``` return $allowed_fields; ``` with ``` return [];//$allowed_fields; ``` However, note that this will apply to all fields, if you want only few fields to behave like this it will require much more changes. Let me know if this works for you
Necessity is the mother of all inventions!
edited Mar 29 at 7:43 pm

Hi,


If you want all the fields to only appear in profile view and not appear in profile edit, you can do this simple change to achieve that:


Open sys/CODOF/User/CustomField.php


Around line 88, replace


return $allowed_fields;
with


return [];//$allowed_fields;
However, note that this will apply to all fields, if you want only few fields to behave like this it will require much more changes.
Let me know if this works for you


Hello admin,


Thank you, this worked!
I appreciate the help


[quote="pid:24821, uid:1"]Hi, If you want all the fields to only appear in profile view and not appear in profile edit, you can do this simple change to achieve that: Open sys/CODOF/User/CustomField.php Around line 88, replace return $allowed_fields; with return [];//$allowed_fields; However, note that this will apply to all fields, if you want only few fields to behave like this it will require much more changes. Let me know if this works for you[/quote] Hello admin, Thank you, this worked! I appreciate the help
40
4
3
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft