Home Forums ACF PRO Making a mini CRM/Portal with ACF Pro. Relationships between custom fields etc


Making a mini CRM/Portal with ACF Pro. Relationships between custom fields etc

  • Hi! I love this plugin. Best $100 I spent! And the support is always brilliant so I’m hoping I can get some good pointers with this one.

    Basically I’ve been tasked with trying to make what I’d call a mini CRM or portal on WordPress.

    I’m pretty sure some of it won’t be possible with ACF, but I’m confident most of it can. Any hints would be great.

    To summarise, we need groups of users. Each group relates to a Client. There will be a main user within that Client group that can create users with less admin rights. Each Client needs a portal home page. Each Client also has the potential for multiple locations, so that portal page needs to know what location those users are based in.

    Admins will need the power to upload files and assign them to a Location. Those users within that Location will then be able to view and download those files. They shouldn’t have the right to view files outside of that Location (I’m struggling with WordPress and ACF to figure this out). I have looked at numerous portal, group and file plugins but none of them work together very intuitively. It’d be great if I could do this with ACF.

    So right now I have this set up:

    • A custom post type called Client, with a custom field for selecting a user as a main user.
    • A custom post type called Location, with custom fields to assign what Client this Location belongs to. And a custom field to assign users to that Location.
    • I have assigned custom fields to the Add User function. When an admin is creating a user, we want to assign them to a Client, which then we want the Location field to appear. I can’t figure out how to make this conditional. When a main user to creating a user, we only want the Locations assigned to their Client to show (as main users should only see the Client they work within).

    What I’m struggling with is relationships between those different CPTs, using ACF custom fields. How can I link users selected on the Location CPT, and to the Client CPT?

    From there I need to display only the Locations and assigned files to those users who have access to them, on their portal page. I have set up a template which checks their username against the custom field on the Location CPT, but then need to show only their select Location’s files. Right now it loads every single Location post on the system then checks if they are allowed to view them. I appreciate that might not be an ACF thing though.

    Has anyone got experience doing something similar?

Viewing 1 post (of 1 total)

The topic ‘Making a mini CRM/Portal with ACF Pro. Relationships between custom fields etc’ is closed to new replies.