Support

Account

Home Forums ACF PRO How to do: Group fields in backend saved for each user

Solved

How to do: Group fields in backend saved for each user

  • Hello everyone,

    I have created a group of fields with repeaters. Users with a custom role can connect to their backend and see a page where it is possible to fill them. I use register_acf_options_pages to create their admin option page, totally generated by ACF Pro.

    But I just realized that, whereas I wanted users can save their own information into these fields, all records are saved for every users. So every users can see the records of others.

    How can I do to let users save their own records in another backend page than their profile? Furthermore, I don’t want to create a post_type, because they will have to create like a new post, whereas I want them to use a simple repeater to save their information, on one page.

    Is it possible?
    Thank you very much!
    Alexandre

  • you have to create a different options page for every user, using a different slug, and save them to a different post ID (which can be the slug of the options page) and you need to only create the options page when that user is logged in (or when some other user, for example your user ID is logged in). This means that if you have 100 users that you will have 100 different options pages. All in all not very efficient.

    Using a CPT will have some additional overhead, but would be a more efficient way to do this. You could automate the creation of a new post in the post type. You could also put the post type list under the users menu and you could set permissions on this post type so that users can only read and edit their own post. Lots of work to get the details ironed out that I don’t have answers to.

  • I see, thank you very much for your explanation.
    I will try different ways to do it.

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

You must be logged in to reply to this topic.