Support

Account

Home Forums Pre-purchase Questions User specific edits?

Solving

User specific edits?

  • I’m not sure whether this is possible or not.

    I basically create reports.

    To make things simple. There are 50 sections on a report with 50 pieces of text I have written.

    However I would like users to be able to edit each section but it’s tied to them.

    When they view the reports on the front end of they have made changes to a section it will show only for them.

    In the backend id have 50 posts. Each containing the default data.

    Users won’t be able to add new data they can only edit the default data I have added.

    However each user will only be able to see and edit their own data.

    Does that make sense.

    For example lets say one section of the report says.
    Title- Elevated Calcium
    Body- Calcium is elevated.

    Could user A login edit that post and change the title to lets say. “Calcium is high”.

    But if user b logs in they will see my default section and may change the title to. Calcium is above 60.

    When I create code for the front end. Whatever each user has written will be shown to them.

    Hope that makes sense.

  • Would this be possible? Yes. The full details of what would need to be done is beyond the scope of what I can help you with here.

    But the basics.

    You would create an admin options page that only you can edit. This would contain the default display values.

    Then you would need to create something else that each user can edit that pertains to only them. This could be a post in a custom post type with access controlled by a user role. It could be fields on the user’s profile page, or it could be another options page specific for each user as I describe here https://support.advancedcustomfields.com/forums/topic/option-pages-advanced-configuration/#post-164216

    In your template you would then check the value on the user page from one of the above options to see if something is entered. If it is then you would display that, if not then you would get and display the value from your master options page.

  • Ok thankyou, so if I make an options page for users to edit how can I show 50 default posts that they can edit themselves and it only gets saved to them.

    Ive had a look myself and cannot seam to figure it out.

    Appreciate the help.

    I am considering storing the info in each users meta because I know then that its stored only for them, however in the future there may be over 1000 different fields and I am worried this could bog things down that’s why Im looking at ACF as a better option to store the data.

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

You must be logged in to reply to this topic.