This is just a followup to my original message.
Just for clarity, here’s the basic situation:
– I have a fieldgroup that applies to all user roles.
– This appears on the user add/edit page (for users with permission to create new users).
– For users without permissions to create new users, the fields should appear on the Profile page, but do not.
CUrrently, location rules are set as:
User : is equal to : Administrator User : is equal to : Representative User : is equal to : All
As I understand it, being logged in as a representative, I should have access to those fields from the Profile page. However, the fieldgroup is not appearing.
Even logged in as an Administrator, the fieldgroup does not appear on the administrator’s profile page. The fieldgroup is only visible from Users > Add New, or Users > All Users > Username.
I have also tried using the ‘Logged in usertype’ option.
Anyway, I’m sorry if I wasn’t clear in my initial question. At this point, I’m just trying to determine if the issue is how I’ve set up the location rules, or if it’s something else.
Any direction is much appreciated.
January 9, 2014 at 2:00 am
I’m having trouble getting a custom field group to appear on the profile page as well.
When creating or editing users, the fields appear. However, on the actual Profile page, the fields don’t show.
So far, I’m using the following location rules:
User : is equal to : All // (This shows the field group on the Add/Edit User Page)
Logged In User : is equal to : Representative // (I was thinking that this would show the fields on the profile page for this role, but it doesn’t)
Anyway, I’m new to the plugin, so any direction about this would be appreciated.
January 9, 2014 at 10:14 am
In the future, can you please create a new topic when your question is different to that of the original topic?
As for your question, the logged in user location rule is exactly that, when the logged in user is ‘Representative’.
If you want the field group to appear on all ‘Representative’ users, just select the location rule:
User : is equal to : Representative
So, the location rules are currently set as: http://i.imgur.com/5mdWjZ9.png
While creating/editing users as an administrator with the current settings, the fields are visible: http://i.imgur.com/Pmg6KWx.png
Anyway, I’m not sure what’s missing here. Do you have any ideas?
Sorry, but I am now quite confused. You say “While creating/editing users as an administrator with the current settings, the fields are visible”.
Should the field’s be hidden?
If the location rule says ‘show this field group if user = ‘all”, then this has nothing to do with being an admin or not.
Perhaps you could clearly describe your end goal and I can direct you to the location rules you need.
Can you please create me an account and provide login details for me to see the issue?
Please test logging in with this account to double check I can see the issue and also include a step by step guide to seeing the issue.
I’ll need access to the field group edit screen and the user edit page in question.
Thnaks for the login.
I can see that another plugin is modifying the DOM which is preventing ACF from finding the normal
I have made a change to the JS selector to allow for these kinds of situations and will release this in the next version.
I have also modified your ACF plugin to include this fix.
I’ve encountered a similar problem and have done some digging to try and get to the bottom of it. I tried the fix you mentioned above (got the new code from github: https://github.com/elliotcondon/acf/commit/df4386fa71f8392aaa6b1ac4aff3e3974b68a782) and it didn’t work.
When the user type “subscriber” is logged in, they can see the custom fields that are assigned to “User = All”.
However, both a “contributor” and an “author” cannot see these fields. The next step up, “Editor” and, of course, “Admin” can.
I messed around with the capabilities assigned to the various roles. And when I add “edit_posts” as a capability to “subscriber” it breaks. I haven’t figured out what other capabilities “counter balance” the issue to where an Editor is able to see the custom fields in their profile.
I even edited “everything_fields.php” to try and see if moving the placement of the custom fields helps. I changed line 424 to
echo "$('#createuser > table.form-table:first > tbody').append( html );";. The same issue manifested.
Thought that this may help to further address the issue. Of course I’m trying to achieve every user type to see the custom fields assigned to the post type = user.
Deep thanks for the hard work on this family of plugins. I use almost all of them now on a daily basis. They rock!
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
📣 “ACF Chat Fridays”— Advanced Custom Fields (@wp_acf) January 31, 2023
The ACF team holds their first open office hours this Friday! Come and talk ACF, and ask questions about building sites with the plugin.
We’d love to see you there!
📆 Friday 3rd Feb - 3pm UTC
👉 Register here - https://t.co/3UtvQbE4CU pic.twitter.com/oTwW9K1XQ0
© 2023 Advanced Custom Fields.