Home Forums General Issues Group editing of user fields


Group editing of user fields

  • Hello
    1- I have a select field that applies to user profiles.
    Now, for example, I want to edit the value of this field in the form of a selected group in the template settings section.
    what do I do.
    2- This field in the user’s profile shows how to not allow the user to edit?

  • Any screen shots of what you are trying to accomplish? It is a bit difficult for me to understand what you are trying to do but maybe that is just me (not an acf expert).

  • No need to include a screenshot. My questions are simple.
    1- How to make a field created for users without editing by the access level of the user.
    2- How to group edit a selected field created for users.

  • Without more context these questions may make sense to you but they make little sense others.

    1) What type of field? What type of user? Where will the field be displayed/used?

    2) What do you mean by “group edit”? this has not meaning to me.

  • Explanation 1: I have a select field that is displayed in the users’ profile when they are logged in to WordPress. This field shows the level of the user, such as level 1, level 2 and level 3.
    I want the value of this field to be locked and not allowed to be edited when the user enters the profile section.

    Explanation 2: For the above part, now I want the site administrator to be able to edit a number of users for this field. It means to be able to select a number of users and then apply the value for example “level 2” to the field.

    Currently, with afc, you can easily add this field to users’ profiles, but I don’t know how to restrict access to it.
    And now I want the administrator to be able to easily edit this field for users. Currently, you have to edit each user separately and then edit the desired field, which is a time-consuming task.
    It would be great if it was possible to create a relationship between the list of users and the values of the field like in the “acf relationship” mode.

  • To limit access to a field see acf/prepare_field. In this filter you get can wp_get_current_user(), check if the current users access level. Return false if the user should not be able to edit it or return the field if they should be able to edit.

    There is no solution for “bulk editing” user fields. In fact, there is not a currently supported solution for bulk editing acf fields. The best advice I can give here it to use WP All Import/Export Pro with the User add on. You could use this to export users, edit values in a CSV and then import the updated values.

  • Thank you for your follow-up.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.